Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/display_tbl.lib.php')
-rw-r--r--libraries/display_tbl.lib.php91
1 files changed, 46 insertions, 45 deletions
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 2a0cfdaea8..f1ffa40444 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -4,6 +4,7 @@
* library for displaying table with results from all sort of select queries
*
* @version $Id$
+ * @package phpMyAdmin
*/
/**
@@ -467,7 +468,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$unsorted_sql_query = $analyzed_sql[0]['unsorted_query'];
}
// Handles the case of multiple clicks on a column's header
- // which would add many spaces before "ORDER BY" in the
+ // which would add many spaces before "ORDER BY" in the
// generated query.
$unsorted_sql_query = trim($unsorted_sql_query);
@@ -507,15 +508,15 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$asc_sort = '`' . implode('` ASC, `', array_keys($index->getColumns())) . '` ASC';
$desc_sort = '`' . implode('` DESC, `', array_keys($index->getColumns())) . '` DESC';
$used_index = $used_index || $local_order == $asc_sort || $local_order == $desc_sort;
- echo '<option value="'
- . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $asc_sort)
- . '"' . ($local_order == $asc_sort ? ' selected="selected"' : '')
- . '>' . htmlspecialchars($index->getName()) . ' ('
+ echo '<option value="'
+ . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $asc_sort)
+ . '"' . ($local_order == $asc_sort ? ' selected="selected"' : '')
+ . '>' . htmlspecialchars($index->getName()) . ' ('
. $GLOBALS['strAscending'] . ')</option>';
- echo '<option value="'
- . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $desc_sort)
- . '"' . ($local_order == $desc_sort ? ' selected="selected"' : '')
- . '>' . htmlspecialchars($index->getName()) . ' ('
+ echo '<option value="'
+ . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $desc_sort)
+ . '"' . ($local_order == $desc_sort ? ' selected="selected"' : '')
+ . '>' . htmlspecialchars($index->getName()) . ' ('
. $GLOBALS['strDescending'] . ')</option>';
}
echo '<option value="' . htmlspecialchars($unsorted_sql_query) . '"' . ($used_index ? '' : ' selected="selected"') . '>' . $GLOBALS['strNone'] . '</option>';
@@ -588,7 +589,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
echo '</form>';
}
- // Start of form for multi-rows edit/delete/export
+ // Start of form for multi-rows edit/delete/export
if ($is_display['del_lnk'] == 'dr' || $is_display['del_lnk'] == 'kp') {
echo '<form method="post" action="tbl_row_action.php" name="rowsDeleteForm" id="rowsDeleteForm">' . "\n";
@@ -749,9 +750,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
if (isset($fields_meta[$i]->orgname)) {
$name_to_use_in_sort = $fields_meta[$i]->orgname;
}
- // $name_to_use_in_sort might contain a space due to
+ // $name_to_use_in_sort might contain a space due to
// formatting of function expressions like "COUNT(name )"
- // so we remove the space in this situation
+ // so we remove the space in this situation
$name_to_use_in_sort = str_replace(' )', ')', $name_to_use_in_sort);
if (empty($sort_expression)) {
@@ -1327,9 +1328,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
$row[$i] = PMA_printable_bit_value($row[$i], $meta->length);
} elseif (stristr($field_flags, 'BINARY') && $meta->type == 'string') {
if ($_SESSION['userconf']['display_binary'] || (isset($GLOBALS['is_analyse']) && $GLOBALS['is_analyse'])) {
- // user asked to see the real contents of BINARY
- // fields, or we detected a PROCEDURE ANALYSE in
- // the query (results are reported as being
+ // user asked to see the real contents of BINARY
+ // fields, or we detected a PROCEDURE ANALYSE in
+ // the query (results are reported as being
// binary strings)
$row[$i] = PMA_replace_binary_contents($row[$i]);
} else {
@@ -1681,7 +1682,7 @@ function PMA_displayTable_checkConfigParams()
// we know that the checkbox was unchecked
unset($_SESSION['userconf']['query'][$sql_key]['hide_transformation']);
}
-
+
// move current query to the last position, to be removed last
// so only least executed query will be removed if maximum remembered queries
// limit is reached
@@ -1815,8 +1816,8 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
$sort_expression = $sort_expression_nodirection = $sort_direction = '';
}
- // 1.4 Prepares display of first and last value of the sorted column
-
+ // 1.4 Prepares display of first and last value of the sorted column
+
if (! empty($sort_expression_nodirection)) {
list($sort_table, $sort_column) = explode('.', $sort_expression_nodirection);
$sort_table = PMA_unQuote($sort_table);
@@ -1833,11 +1834,11 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
if ($sorted_column_index !== false) {
// fetch first row of the result set
$row = PMA_DBI_fetch_row($dt_result);
- $column_for_first_row = $row[$sorted_column_index];
+ $column_for_first_row = $row[$sorted_column_index];
// fetch last row of the result set
PMA_DBI_data_seek($dt_result, $num_rows - 1);
$row = PMA_DBI_fetch_row($dt_result);
- $column_for_last_row = $row[$sorted_column_index];
+ $column_for_last_row = $row[$sorted_column_index];
// reset to first row for the loop in PMA_displayTableBody()
PMA_DBI_data_seek($dt_result, 0);
// we could also use here $sort_expression_nodirection
@@ -1846,7 +1847,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
}
unset($sorted_column_index, $sort_table, $sort_column);
}
-
+
// 2. ----- Displays the top of the page -----
// 2.1 Displays a messages with position informations
@@ -2109,7 +2110,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
// (the url_query has extra parameters that won't be used to export)
// (the single_table parameter is used in display_export.lib.php
// to hide the SQL and the structure export dialogs)
- // If the parser found a PROCEDURE clause
+ // If the parser found a PROCEDURE clause
// (most probably PROCEDURE ANALYSE()) it makes no sense to
// display the Export link).
if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) {
@@ -2151,10 +2152,10 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
}
/**
- * Verifies what to do with non-printable contents (binary or BLOB)
+ * Verifies what to do with non-printable contents (binary or BLOB)
* in Browse mode.
*
- * @uses is_null()
+ * @uses is_null()
* @uses isset()
* @uses strlen()
* @uses PMA_formatByteDown()
@@ -2162,10 +2163,10 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
* @uses str_replace()
* @param string $category BLOB|BINARY
* @param string $content the binary content
- * @param string $transform_function
+ * @param string $transform_function
* @param string $transform_options
* @param string $default_function
- * @param object $meta the meta-information about this field
+ * @param object $meta the meta-information about this field
* @return mixed string or float
*/
function PMA_handle_non_printable_contents($category, $content, $transform_function, $transform_options, $default_function, $meta) {
@@ -2190,7 +2191,7 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
$result = $default_function($result, array(), $meta);
if (stristr($meta->type, 'BLOB') && $_SESSION['userconf']['display_blob']) {
// in this case, restart from the original $content
- $result = PMA_replace_binary_contents($content);
+ $result = PMA_replace_binary_contents($content);
}
}
}
@@ -2202,20 +2203,20 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
* taking into account foreign key description field and transformations
*
* @uses is_array()
- * @uses PMA_backquote()
- * @uses PMA_DBI_try_query()
- * @uses PMA_DBI_num_rows()
- * @uses PMA_DBI_fetch_row()
- * @uses $GLOBALS['strLinkNotFound']
- * @uses PMA_DBI_free_result()
- * @uses $GLOBALS['printview']
- * @uses htmlspecialchars()
- * @uses PMA_generate_common_url()
- * @param string $mouse_events
+ * @uses PMA_backquote()
+ * @uses PMA_DBI_try_query()
+ * @uses PMA_DBI_num_rows()
+ * @uses PMA_DBI_fetch_row()
+ * @uses $GLOBALS['strLinkNotFound']
+ * @uses PMA_DBI_free_result()
+ * @uses $GLOBALS['printview']
+ * @uses htmlspecialchars()
+ * @uses PMA_generate_common_url()
+ * @param string $mouse_events
* @param string $class
* @param string $condition_field
* @param string $analyzed_sql
- * @param object $meta the meta-information about this field
+ * @param object $meta the meta-information about this field
* @param string $map
* @param string $data
* @param string $transform_function
@@ -2240,17 +2241,17 @@ function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed
$meta->name = $true_column;
} // end if
} // end if
- } // end foreach
+ } // end foreach
} // end if
if (isset($map[$meta->name])) {
// Field to display from the foreign table?
if (isset($map[$meta->name][2]) && strlen($map[$meta->name][2])) {
$dispsql = 'SELECT ' . PMA_backquote($map[$meta->name][2])
- . ' FROM ' . PMA_backquote($map[$meta->name][3])
+ . ' FROM ' . PMA_backquote($map[$meta->name][3])
. '.' . PMA_backquote($map[$meta->name][0])
. ' WHERE ' . PMA_backquote($map[$meta->name][1])
- . $where_comparison;
+ . $where_comparison;
$dispresult = PMA_DBI_try_query($dispsql, null, PMA_DBI_QUERY_STORE);
if ($dispresult && PMA_DBI_num_rows($dispresult) > 0) {
list($dispval) = PMA_DBI_fetch_row($dispresult, 0);
@@ -2285,15 +2286,15 @@ function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed
);
$result .= '<a href="sql.php' . PMA_generate_common_url($_url_params)
. '"' . $title . '>';
-
+
if ($transform_function != $default_function) {
- // always apply a transformation on the real data,
+ // always apply a transformation on the real data,
// not on the display field
$result .= $transform_function($data, $transform_options, $meta);
} else {
if ('D' == $_SESSION['userconf']['relational_display']) {
- // user chose "relational display field" in the
- // display options, so show display field in the cell
+ // user chose "relational display field" in the
+ // display options, so show display field in the cell
$result .= $transform_function($dispval, array(), $meta);
} else {
// otherwise display data in the cell