From 38fea0cc9e04d84bdbd74cb98d6b87cfc613bfed Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 20 Jun 2009 16:36:58 +0000 Subject: [PATCH] in SESSION, userconf renamed to tmp_user_values to avoid confusion with the future db-based user preferences --- libraries/Config.class.php | 2 +- libraries/common.inc.php | 14 +- libraries/common.lib.php | 2 +- libraries/db_info.inc.php | 10 +- libraries/display_tbl.lib.php | 310 +++++++++--------- navigation.php | 24 +- sql.php | 8 +- .../darkblue_orange/css/theme_right.css.php | 2 +- themes/original/css/theme_left.css.php | 6 +- themes/original/css/theme_right.css.php | 2 +- 10 files changed, 190 insertions(+), 190 deletions(-) diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 6934a2c8e..2fb5b4283 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -554,7 +554,7 @@ class PMA_Config */ function getThemeUniqueValue() { - return intval((null !== $_SESSION['PMA_Config']->get('fontsize') ? $_SESSION['PMA_Config']->get('fontsize') : (isset($_COOKIE['pma_fontsize']) ? $_COOKIE['pma_fontsize'] : 0))) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info) . (isset($_SESSION['userconf']['custom_color']) ? substr($_SESSION['userconf']['custom_color'],1,6) : ''); + return intval((null !== $_SESSION['PMA_Config']->get('fontsize') ? $_SESSION['PMA_Config']->get('fontsize') : (isset($_COOKIE['pma_fontsize']) ? $_COOKIE['pma_fontsize'] : 0))) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info) . (isset($_SESSION['tmp_user_values']['custom_color']) ? substr($_SESSION['tmp_user_values']['custom_color'],1,6) : ''); } /** diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 1ebbb88d0..09cd94054 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -653,11 +653,11 @@ unset($default_server); /* setup themes LABEL_theme_setup */ if (isset($_REQUEST['custom_color_reset'])) { - unset($_SESSION['userconf']['custom_color']); - unset($_SESSION['userconf']['custom_color_rgb']); + unset($_SESSION['tmp_user_values']['custom_color']); + unset($_SESSION['tmp_user_values']['custom_color_rgb']); } elseif (isset($_REQUEST['custom_color'])) { - $_SESSION['userconf']['custom_color'] = $_REQUEST['custom_color']; - $_SESSION['userconf']['custom_color_rgb'] = $_REQUEST['custom_color_rgb']; + $_SESSION['tmp_user_values']['custom_color'] = $_REQUEST['custom_color']; + $_SESSION['tmp_user_values']['custom_color_rgb'] = $_REQUEST['custom_color_rgb']; } /** * @global PMA_Theme_Manager $_SESSION['PMA_Theme_Manager'] @@ -943,10 +943,10 @@ if (! defined('PMA_MINIMUM_COMMON')) { /** * some resetting has to be done when switching servers */ - if (isset($_SESSION['userconf']['previous_server']) && $_SESSION['userconf']['previous_server'] != $GLOBALS['server']) { - unset($_SESSION['userconf']['navi_limit_offset']); + if (isset($_SESSION['tmp_user_values']['previous_server']) && $_SESSION['tmp_user_values']['previous_server'] != $GLOBALS['server']) { + unset($_SESSION['tmp_user_values']['navi_limit_offset']); } - $_SESSION['userconf']['previous_server'] = $GLOBALS['server']; + $_SESSION['tmp_user_values']['previous_server'] = $GLOBALS['server']; } // end server connecting diff --git a/libraries/common.lib.php b/libraries/common.lib.php index ec3787c70..8ffceb579 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -957,7 +957,7 @@ function PMA_reloadNavigation() // in this case, get rid of the table limit offset, otherwise // we have a problem when dropping a table on the last page // and the offset becomes greater than the total number of tables - unset($_SESSION['userconf']['table_limit_offset']); + unset($_SESSION['tmp_user_values']['table_limit_offset']); echo "\n"; $reload_url = './navigation.php?' . PMA_generate_common_url($GLOBALS['db'], '', '&'); ?> diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php index a7e2e286e..4f59baa47 100644 --- a/libraries/db_info.inc.php +++ b/libraries/db_info.inc.php @@ -46,14 +46,14 @@ require_once './libraries/common.inc.php'; /** * limits for table list */ -if (! isset($_SESSION['userconf']['table_limit_offset']) || $_SESSION['userconf']['table_limit_offset_db'] != $db) { - $_SESSION['userconf']['table_limit_offset'] = 0; - $_SESSION['userconf']['table_limit_offset_db'] = $db; +if (! isset($_SESSION['tmp_user_values']['table_limit_offset']) || $_SESSION['tmp_user_values']['table_limit_offset_db'] != $db) { + $_SESSION['tmp_user_values']['table_limit_offset'] = 0; + $_SESSION['tmp_user_values']['table_limit_offset_db'] = $db; } if (isset($_REQUEST['pos'])) { - $_SESSION['userconf']['table_limit_offset'] = (int) $_REQUEST['pos']; + $_SESSION['tmp_user_values']['table_limit_offset'] = (int) $_REQUEST['pos']; } -$pos = $_SESSION['userconf']['table_limit_offset']; +$pos = $_SESSION['tmp_user_values']['table_limit_offset']; /** * fills given tooltip arrays diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 6bd13a33c..d983db322 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -239,10 +239,10 @@ function PMA_displayTableNavigationOneButton($caption, $title, $pos, $html_sql_q /** * Displays a navigation bar to browse among the results of a SQL query * - * @uses $_SESSION['userconf']['disp_direction'] - * @uses $_SESSION['userconf']['repeat_cells'] - * @uses $_SESSION['userconf']['max_rows'] - * @uses $_SESSION['userconf']['pos'] + * @uses $_SESSION['tmp_user_values']['disp_direction'] + * @uses $_SESSION['tmp_user_values']['repeat_cells'] + * @uses $_SESSION['tmp_user_values']['max_rows'] + * @uses $_SESSION['tmp_user_values']['pos'] * @param integer the offset for the "next" page * @param integer the offset for the "previous" page * @param string the URL-encoded query @@ -286,7 +286,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di " /> - +
@@ -316,10 +316,10 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', ' $GLOBALS['strRowsModeHorizontal'], 'horizontalflipped' => $GLOBALS['strRowsModeFlippedHorizontal'], 'vertical' => $GLOBALS['strRowsModeVertical']); - $param1 = PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['userconf']['disp_direction'], $id_for_direction_dropdown); + $param1 = PMA_generate_html_dropdown('disp_direction', $choices, $_SESSION['tmp_user_values']['disp_direction'], $id_for_direction_dropdown); unset($choices); - $param2 = ' ' . "\n" + $param2 = ' ' . "\n" . ' '; echo ' ' . sprintf($GLOBALS['strRowsModeOptions'], "\n" . $param1, "\n" . $param2) . "\n"; ?> @@ -330,8 +330,8 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', ' = $_SESSION['userconf']['max_rows'] - && $_SESSION['userconf']['max_rows'] != 'all') { + if (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows) && $num_rows >= $_SESSION['tmp_user_values']['max_rows'] + && $_SESSION['tmp_user_values']['max_rows'] != 'all') { // display the Next button PMA_displayTableNavigationOneButton('>', @@ -351,9 +351,9 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '= $_SESSION['userconf']['max_rows']) ? 'true' : 'false') . '"', + 'onsubmit="return ' . (($_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows'] < $unlim_num_rows && $num_rows >= $_SESSION['tmp_user_values']['max_rows']) ? 'true' : 'false') . '"', $input_for_real_end, $onclick ); @@ -362,9 +362,9 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', ' 1){ //if2 ?> @@ -383,7 +383,7 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '' . "\n"; @@ -559,11 +559,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ 'P' => $GLOBALS['strPartialText'], 'F' => $GLOBALS['strFullText'] ); - PMA_display_html_radio('display_text', $choices, $_SESSION['userconf']['display_text']); + PMA_display_html_radio('display_text', $choices, $_SESSION['tmp_user_values']['display_text']); echo ''; // prepare full/partial text button or link - if ($_SESSION['userconf']['display_text']=='F') { + if ($_SESSION['tmp_user_values']['display_text']=='F') { // currently in fulltext mode so show the opposite link $tmp_image_file = $GLOBALS['pmaThemeImage'] . 's_partialtext.png'; $tmp_txt = $GLOBALS['strPartialText']; @@ -586,14 +586,14 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ 'K' => $GLOBALS['strRelationalKey'], 'D' => $GLOBALS['strRelationalDisplayField'] ); - PMA_display_html_radio('relational_display', $choices, $_SESSION['userconf']['relational_display']); + PMA_display_html_radio('relational_display', $choices, $_SESSION['tmp_user_values']['relational_display']); echo ''; } echo '
'; - PMA_display_html_checkbox('display_binary', $GLOBALS['strShowBinaryContents'], ! empty($_SESSION['userconf']['display_binary']), false); + PMA_display_html_checkbox('display_binary', $GLOBALS['strShowBinaryContents'], ! empty($_SESSION['tmp_user_values']['display_binary']), false); echo '
'; - PMA_display_html_checkbox('display_blob', $GLOBALS['strShowBLOBContents'], ! empty($_SESSION['userconf']['display_blob']), false); + PMA_display_html_checkbox('display_blob', $GLOBALS['strShowBLOBContents'], ! empty($_SESSION['tmp_user_values']['display_blob']), false); echo '
'; // I would have preferred to name this "display_transformation". @@ -601,7 +601,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // per SQL query, and at the same time have a default that displays // the transformations. echo '
'; - PMA_display_html_checkbox('hide_transformation', $GLOBALS['strHide'] . ' ' . $GLOBALS['strMIME_transformation'], ! empty($_SESSION['userconf']['hide_transformation']), false); + PMA_display_html_checkbox('hide_transformation', $GLOBALS['strHide'] . ' ' . $GLOBALS['strMIME_transformation'], ! empty($_SESSION['tmp_user_values']['hide_transformation']), false); echo '
'; echo '
'; @@ -623,14 +623,14 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } echo '' . "\n"; - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo '' . "\n"; } // 1. Displays the full/partial text button (part 1)... - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { $colspan = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? ' colspan="3"' : ''; @@ -644,8 +644,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ if (($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn') && $is_display['text_btn'] == '1') { $vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 3 : 0; - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { ?> @@ -655,7 +655,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ else { ?> - + > name), "
\n") : htmlspecialchars($fields_meta[$i]->name)); + $order_link_content = ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake' ? PMA_flipstring(htmlspecialchars($fields_meta[$i]->name), "
\n") : htmlspecialchars($fields_meta[$i]->name)); $order_link = PMA_linkOrButton($order_url, $order_link_content . $order_img, $order_link_params, false, true); - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo '' . $order_link . $comments . ''; @@ -873,21 +873,21 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // 2.2 Results can't be sorted else { - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo ''; - if ($_SESSION['userconf']['disp_direction'] == 'horizontalflipped' + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake') { echo PMA_flipstring(htmlspecialchars($fields_meta[$i]->name), '
'); } else { @@ -908,8 +908,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn') && $is_display['text_btn'] == '1') { $vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 3 : 1; - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo "\n"; ?>
@@ -957,12 +957,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ /** * Displays the body of the results table * - * @uses $_SESSION['userconf']['disp_direction'] - * @uses $_SESSION['userconf']['repeat_cells'] - * @uses $_SESSION['userconf']['max_rows'] - * @uses $_SESSION['userconf']['display_text'] - * @uses $_SESSION['userconf']['display_binary'] - * @uses $_SESSION['userconf']['display_blob'] + * @uses $_SESSION['tmp_user_values']['disp_direction'] + * @uses $_SESSION['tmp_user_values']['repeat_cells'] + * @uses $_SESSION['tmp_user_values']['max_rows'] + * @uses $_SESSION['tmp_user_values']['display_text'] + * @uses $_SESSION['tmp_user_values']['display_binary'] + * @uses $_SESSION['tmp_user_values']['display_blob'] * @param integer the link id associated to the query which results have * to be displayed * @param array which elements to display @@ -1036,9 +1036,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $odd_row = true; while ($row = PMA_DBI_fetch_row($dt_result)) { // lem9: "vertical display" mode stuff - if ($row_no != 0 && $_SESSION['userconf']['repeat_cells'] != 0 && !($row_no % $_SESSION['userconf']['repeat_cells']) - && ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped')) + if ($row_no != 0 && $_SESSION['tmp_user_values']['repeat_cells'] != 0 && !($row_no % $_SESSION['tmp_user_values']['repeat_cells']) + && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) { echo '' . "\n"; if ($vertical_display['emptypre'] > 0) { @@ -1059,8 +1059,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $class = $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { // loic1: pointer code part echo ' ' . "\n"; $class = ''; @@ -1172,8 +1172,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // 1.3 Displays the links at left if required if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] - && ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped')) { + && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) { $doWriteModifyAt = 'left'; require './libraries/display_tbl_links.lib.php'; } // end if (1.3) @@ -1192,7 +1192,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { } $mouse_events = ''; - if ($_SESSION['userconf']['disp_direction'] == 'vertical' && (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical' && (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) { if ($GLOBALS['cfg']['BrowsePointerEnable'] == true) { $mouse_events .= ' onmouseover="setVerticalPointer(this, ' . $row_no . ', \'over\', \'odd\', \'even\', \'hover\', \'marked\');"' . ' onmouseout="setVerticalPointer(this, ' . $row_no . ', \'out\', \'odd\', \'even\', \'hover\', \'marked\');" '; @@ -1323,7 +1323,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $vertical_display['data'][$row_no][$i] = ' NULL' . "\n"; } elseif ($row[$i] != '') { // garvin: if a transform function for blob is set, none of these replacements will be made - if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['userconf']['display_text'] == 'P') { + if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P') { $row[$i] = PMA_substr($row[$i], 0, $GLOBALS['cfg']['LimitChars']) . '...'; } // loic1: displays all space characters, 4 space @@ -1345,7 +1345,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // nijel: Cut all fields to $GLOBALS['cfg']['LimitChars'] // lem9: (unless it's a link-type transformation) - if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['userconf']['display_text'] == 'P' && !strpos($transform_function, 'link') === true) { + if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P' && !strpos($transform_function, 'link') === true) { $row[$i] = PMA_substr($row[$i], 0, $GLOBALS['cfg']['LimitChars']) . '...'; } @@ -1354,7 +1354,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { if (isset($meta->_type) && $meta->_type === MYSQLI_TYPE_BIT) { $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'])) { + if ($_SESSION['tmp_user_values']['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 @@ -1382,8 +1382,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { } // lem9: output stored cell - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo $vertical_display['data'][$row_no][$i]; } @@ -1396,14 +1396,14 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // 3. Displays the modify/delete links on the right if required if ($GLOBALS['cfg']['ModifyDeleteAtRight'] - && ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped')) { + && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) { $doWriteModifyAt = 'right'; require './libraries/display_tbl_links.lib.php'; } // end if (3) - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { ?> ' . "\n"; } @@ -1503,7 +1503,7 @@ function PMA_displayVerticalTable() } $foo_counter = 0; foreach ($vertical_display['edit'] as $val) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo ' ' . "\n"; } @@ -1521,7 +1521,7 @@ function PMA_displayVerticalTable() } $foo_counter = 0; foreach ($vertical_display['delete'] as $val) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo '' . "\n"; } @@ -1539,7 +1539,7 @@ function PMA_displayVerticalTable() $foo_counter = 0; foreach ($vertical_display['rowdata'][$key] as $subval) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) and !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) and !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo $val; } @@ -1556,7 +1556,7 @@ function PMA_displayVerticalTable() echo $vertical_display['textbtn']; $foo_counter = 0; foreach ($vertical_display['row_delete'] as $val) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo '' . "\n"; } @@ -1574,7 +1574,7 @@ function PMA_displayVerticalTable() } $foo_counter = 0; foreach ($vertical_display['edit'] as $val) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo '' . "\n"; } @@ -1592,7 +1592,7 @@ function PMA_displayVerticalTable() } $foo_counter = 0; foreach ($vertical_display['delete'] as $val) { - if (($foo_counter != 0) && ($_SESSION['userconf']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['userconf']['repeat_cells'])) { + if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) { echo '' . "\n"; } @@ -1607,24 +1607,24 @@ function PMA_displayVerticalTable() /** * - * @uses $_SESSION['userconf']['disp_direction'] + * @uses $_SESSION['tmp_user_values']['disp_direction'] * @uses $_REQUEST['disp_direction'] * @uses $GLOBALS['cfg']['DefaultDisplay'] - * @uses $_SESSION['userconf']['repeat_cells'] + * @uses $_SESSION['tmp_user_values']['repeat_cells'] * @uses $_REQUEST['repeat_cells'] * @uses $GLOBALS['cfg']['RepeatCells'] - * @uses $_SESSION['userconf']['max_rows'] + * @uses $_SESSION['tmp_user_values']['max_rows'] * @uses $_REQUEST['session_max_rows'] * @uses $GLOBALS['cfg']['MaxRows'] - * @uses $_SESSION['userconf']['pos'] + * @uses $_SESSION['tmp_user_values']['pos'] * @uses $_REQUEST['pos'] - * @uses $_SESSION['userconf']['display_text'] + * @uses $_SESSION['tmp_user_values']['display_text'] * @uses $_REQUEST['display_text'] - * @uses $_SESSION['userconf']['relational_display'] + * @uses $_SESSION['tmp_user_values']['relational_display'] * @uses $_REQUEST['relational_display'] - * @uses $_SESSION['userconf']['display_binary'] + * @uses $_SESSION['tmp_user_values']['display_binary'] * @uses $_REQUEST['display_binary'] - * @uses $_SESSION['userconf']['display_blob'] + * @uses $_SESSION['tmp_user_values']['display_blob'] * @uses $_REQUEST['display_blob'] * @uses PMA_isValid() * @uses $GLOBALS['sql_query'] @@ -1637,107 +1637,107 @@ function PMA_displayTable_checkConfigParams() { $sql_key = md5($GLOBALS['sql_query']); - $_SESSION['userconf']['query'][$sql_key]['sql'] = $GLOBALS['sql_query']; + $_SESSION['tmp_user_values']['query'][$sql_key]['sql'] = $GLOBALS['sql_query']; if (PMA_isValid($_REQUEST['disp_direction'], array('horizontal', 'vertical', 'horizontalflipped'))) { - $_SESSION['userconf']['query'][$sql_key]['disp_direction'] = $_REQUEST['disp_direction']; + $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'] = $_REQUEST['disp_direction']; unset($_REQUEST['disp_direction']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['disp_direction'])) { - $_SESSION['userconf']['query'][$sql_key]['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay']; } if (PMA_isValid($_REQUEST['repeat_cells'], 'numeric')) { - $_SESSION['userconf']['query'][$sql_key]['repeat_cells'] = $_REQUEST['repeat_cells']; + $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'] = $_REQUEST['repeat_cells']; unset($_REQUEST['repeat_cells']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['repeat_cells'])) { - $_SESSION['userconf']['query'][$sql_key]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; } if (PMA_isValid($_REQUEST['session_max_rows'], 'numeric') || $_REQUEST['session_max_rows'] == 'all') { - $_SESSION['userconf']['query'][$sql_key]['max_rows'] = $_REQUEST['session_max_rows']; + $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'] = $_REQUEST['session_max_rows']; unset($_REQUEST['session_max_rows']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['max_rows'])) { - $_SESSION['userconf']['query'][$sql_key]['max_rows'] = $GLOBALS['cfg']['MaxRows']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'] = $GLOBALS['cfg']['MaxRows']; } if (PMA_isValid($_REQUEST['pos'], 'numeric')) { - $_SESSION['userconf']['query'][$sql_key]['pos'] = $_REQUEST['pos']; + $_SESSION['tmp_user_values']['query'][$sql_key]['pos'] = $_REQUEST['pos']; unset($_REQUEST['pos']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['pos'])) { - $_SESSION['userconf']['query'][$sql_key]['pos'] = 0; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['pos'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['pos'] = 0; } if (PMA_isValid($_REQUEST['display_text'], array('P', 'F'))) { - $_SESSION['userconf']['query'][$sql_key]['display_text'] = $_REQUEST['display_text']; + $_SESSION['tmp_user_values']['query'][$sql_key]['display_text'] = $_REQUEST['display_text']; unset($_REQUEST['display_text']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['display_text'])) { - $_SESSION['userconf']['query'][$sql_key]['display_text'] = 'P'; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['display_text'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['display_text'] = 'P'; } if (PMA_isValid($_REQUEST['relational_display'], array('K', 'D'))) { - $_SESSION['userconf']['query'][$sql_key]['relational_display'] = $_REQUEST['relational_display']; + $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'] = $_REQUEST['relational_display']; unset($_REQUEST['relational_display']); - } elseif (empty($_SESSION['userconf']['query'][$sql_key]['relational_display'])) { - $_SESSION['userconf']['query'][$sql_key]['relational_display'] = 'K'; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'])) { + $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'] = 'K'; } if (isset($_REQUEST['display_binary'])) { - $_SESSION['userconf']['query'][$sql_key]['display_binary'] = true; + $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary'] = true; unset($_REQUEST['display_binary']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['userconf']['query'][$sql_key]['display_binary']); + unset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary']); } else { // selected by default because some operations like OPTIMIZE TABLE // and all queries involving functions return "binary" contents, // according to low-level field flags - $_SESSION['userconf']['query'][$sql_key]['display_binary'] = true; + $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary'] = true; } if (isset($_REQUEST['display_blob'])) { - $_SESSION['userconf']['query'][$sql_key]['display_blob'] = true; + $_SESSION['tmp_user_values']['query'][$sql_key]['display_blob'] = true; unset($_REQUEST['display_blob']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['userconf']['query'][$sql_key]['display_blob']); + unset($_SESSION['tmp_user_values']['query'][$sql_key]['display_blob']); } if (isset($_REQUEST['hide_transformation'])) { - $_SESSION['userconf']['query'][$sql_key]['hide_transformation'] = true; + $_SESSION['tmp_user_values']['query'][$sql_key]['hide_transformation'] = true; unset($_REQUEST['hide_transformation']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['userconf']['query'][$sql_key]['hide_transformation']); + unset($_SESSION['tmp_user_values']['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 - $tmp = $_SESSION['userconf']['query'][$sql_key]; - unset($_SESSION['userconf']['query'][$sql_key]); - $_SESSION['userconf']['query'][$sql_key] = $tmp; + $tmp = $_SESSION['tmp_user_values']['query'][$sql_key]; + unset($_SESSION['tmp_user_values']['query'][$sql_key]); + $_SESSION['tmp_user_values']['query'][$sql_key] = $tmp; // do not exceed a maximum number of queries to remember - if (count($_SESSION['userconf']['query']) > 10) { - array_shift($_SESSION['userconf']['query']); + if (count($_SESSION['tmp_user_values']['query']) > 10) { + array_shift($_SESSION['tmp_user_values']['query']); //echo 'deleting one element ...'; } // populate query configuration - $_SESSION['userconf']['display_text'] = $_SESSION['userconf']['query'][$sql_key]['display_text']; - $_SESSION['userconf']['relational_display'] = $_SESSION['userconf']['query'][$sql_key]['relational_display']; - $_SESSION['userconf']['display_binary'] = isset($_SESSION['userconf']['query'][$sql_key]['display_binary']) ? true : false; - $_SESSION['userconf']['display_blob'] = isset($_SESSION['userconf']['query'][$sql_key]['display_blob']) ? true : false; - $_SESSION['userconf']['hide_transformation'] = isset($_SESSION['userconf']['query'][$sql_key]['hide_transformation']) ? true : false; - $_SESSION['userconf']['pos'] = $_SESSION['userconf']['query'][$sql_key]['pos']; - $_SESSION['userconf']['max_rows'] = $_SESSION['userconf']['query'][$sql_key]['max_rows']; - $_SESSION['userconf']['repeat_cells'] = $_SESSION['userconf']['query'][$sql_key]['repeat_cells']; - $_SESSION['userconf']['disp_direction'] = $_SESSION['userconf']['query'][$sql_key]['disp_direction']; + $_SESSION['tmp_user_values']['display_text'] = $_SESSION['tmp_user_values']['query'][$sql_key]['display_text']; + $_SESSION['tmp_user_values']['relational_display'] = $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display']; + $_SESSION['tmp_user_values']['display_binary'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary']) ? true : false; + $_SESSION['tmp_user_values']['display_blob'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['display_blob']) ? true : false; + $_SESSION['tmp_user_values']['hide_transformation'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['hide_transformation']) ? true : false; + $_SESSION['tmp_user_values']['pos'] = $_SESSION['tmp_user_values']['query'][$sql_key]['pos']; + $_SESSION['tmp_user_values']['max_rows'] = $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows']; + $_SESSION['tmp_user_values']['repeat_cells'] = $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells']; + $_SESSION['tmp_user_values']['disp_direction'] = $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction']; /* * debugging echo '
';
-    var_dump($_SESSION['userconf']);
+    var_dump($_SESSION['tmp_user_values']);
     echo '
'; */ } @@ -1751,7 +1751,7 @@ function PMA_displayTable_checkConfigParams() * @param array the display mode * @param array the analyzed query * - * @uses $_SESSION['userconf']['pos'] + * @uses $_SESSION['tmp_user_values']['pos'] * @global string $db the database name * @global string $table the table name * @global string $goto the URL to go back in case of errors @@ -1814,12 +1814,12 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) // 1.2 Defines offsets for the next and previous pages if ($is_display['nav_bar'] == '1') { - if ($_SESSION['userconf']['max_rows'] == 'all') { + if ($_SESSION['tmp_user_values']['max_rows'] == 'all') { $pos_next = 0; $pos_prev = 0; } else { - $pos_next = $_SESSION['userconf']['pos'] + $_SESSION['userconf']['max_rows']; - $pos_prev = $_SESSION['userconf']['pos'] - $_SESSION['userconf']['max_rows']; + $pos_next = $_SESSION['tmp_user_values']['pos'] + $_SESSION['tmp_user_values']['max_rows']; + $pos_prev = $_SESSION['tmp_user_values']['pos'] - $_SESSION['tmp_user_values']['max_rows']; if ($pos_prev < 0) { $pos_prev = 0; } @@ -1884,7 +1884,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) } else { $selectstring = ''; } - $last_shown_rec = ($_SESSION['userconf']['max_rows'] == 'all' || $pos_next > $total) + $last_shown_rec = ($_SESSION['tmp_user_values']['max_rows'] == 'all' || $pos_next > $total) ? $total - 1 : $pos_next - 1; @@ -1899,7 +1899,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) } $message = PMA_Message::success('strShowingRecords'); - $message->addMessage($_SESSION['userconf']['pos']); + $message->addMessage($_SESSION['tmp_user_values']['pos']); if ($message_view_warning) { $message->addMessage('...', ' - '); $message->addMessage($message_view_warning); @@ -1986,7 +1986,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) echo '' . "\n"; PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql); // vertical output case - if ($_SESSION['userconf']['disp_direction'] == 'vertical') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical') { PMA_displayVerticalTable(); } // end if unset($vertical_display); @@ -2012,7 +2012,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) $_url_params['checkall'] = '1'; $checkall_url = 'sql.php' . PMA_generate_common_url($_url_params); - if ($_SESSION['userconf']['disp_direction'] == 'vertical') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical') { $checkall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', true)) return false;'; $uncheckall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', false)) return false;'; } else { @@ -2021,7 +2021,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) } $checkall_link = PMA_linkOrButton($checkall_url, $GLOBALS['strCheckAll'], $checkall_params, false); $uncheckall_link = PMA_linkOrButton($uncheckall_url, $GLOBALS['strUncheckAll'], $uncheckall_params, false); - if ($_SESSION['userconf']['disp_direction'] != 'vertical') { + if ($_SESSION['tmp_user_values']['disp_direction'] != 'vertical') { echo '' . $GLOBALS['strWithChecked'] . ''; @@ -2079,8 +2079,8 @@ function default_function($buffer) { * @param array the display mode * @param array the analyzed query * - * @uses $_SESSION['userconf']['pos'] - * @uses $_SESSION['userconf']['display_text'] + * @uses $_SESSION['tmp_user_values']['pos'] + * @uses $_SESSION['tmp_user_values']['display_text'] * @global string $db the database name * @global string $table the table name * @global string $sql_query the current SQL query @@ -2122,7 +2122,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) { PMA_getIcon('b_print.png', $GLOBALS['strPrintView'], false, true), '', true, true, 'print_view') . "\n"; - if ($_SESSION['userconf']['display_text']) { + if ($_SESSION['tmp_user_values']['display_text']) { $_url_params['display_text'] = 'F'; echo PMA_linkOrButton( 'sql.php' . PMA_generate_common_url($_url_params), @@ -2216,7 +2216,7 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct $result = $transform_function($result, $transform_options, $meta); } else { $result = $default_function($result, array(), $meta); - if (stristr($meta->type, 'BLOB') && $_SESSION['userconf']['display_blob']) { + if (stristr($meta->type, 'BLOB') && $_SESSION['tmp_user_values']['display_blob']) { // in this case, restart from the original $content $result = PMA_replace_binary_contents($content); } @@ -2294,7 +2294,7 @@ function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed $result .= ($transform_function != $default_function ? $transform_function($data, $transform_options, $meta) : $transform_function($data, array(), $meta)) . ' [->' . $dispval . ']'; } else { - if ('K' == $_SESSION['userconf']['relational_display']) { + if ('K' == $_SESSION['tmp_user_values']['relational_display']) { // user chose "relational key" in the display options, so // the title contains the display field $title = (! empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : ''; @@ -2319,7 +2319,7 @@ function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed // not on the display field $result .= $transform_function($data, $transform_options, $meta); } else { - if ('D' == $_SESSION['userconf']['relational_display']) { + if ('D' == $_SESSION['tmp_user_values']['relational_display']) { // user chose "relational display field" in the // display options, so show display field in the cell $result .= $transform_function($dispval, array(), $meta); diff --git a/navigation.php b/navigation.php index e690b1550..7818111d5 100644 --- a/navigation.php +++ b/navigation.php @@ -63,23 +63,23 @@ function PMA_exitNavigationFrame() } // keep the offset of the db list in session before closing it -if (! isset($_SESSION['userconf']['navi_limit_offset'])) { - $_SESSION['userconf']['navi_limit_offset'] = 0; +if (! isset($_SESSION['tmp_user_values']['navi_limit_offset'])) { + $_SESSION['tmp_user_values']['navi_limit_offset'] = 0; } -if (! isset($_SESSION['userconf']['table_limit_offset']) || $_SESSION['userconf']['table_limit_offset_db'] != $db) { - $_SESSION['userconf']['table_limit_offset'] = 0; - $_SESSION['userconf']['table_limit_offset_db'] = $db; +if (! isset($_SESSION['tmp_user_values']['table_limit_offset']) || $_SESSION['tmp_user_values']['table_limit_offset_db'] != $db) { + $_SESSION['tmp_user_values']['table_limit_offset'] = 0; + $_SESSION['tmp_user_values']['table_limit_offset_db'] = $db; } if (isset($_REQUEST['pos'])) { if (isset($_REQUEST['tpos'])) { - $_SESSION['userconf']['table_limit_offset'] = (int) $_REQUEST['pos']; + $_SESSION['tmp_user_values']['table_limit_offset'] = (int) $_REQUEST['pos']; } else { - $_SESSION['userconf']['navi_limit_offset'] = (int) $_REQUEST['pos']; + $_SESSION['tmp_user_values']['navi_limit_offset'] = (int) $_REQUEST['pos']; } } -$pos = $_SESSION['userconf']['navi_limit_offset']; -$tpos = $_SESSION['userconf']['table_limit_offset']; +$pos = $_SESSION['tmp_user_values']['navi_limit_offset']; +$tpos = $_SESSION['tmp_user_values']['table_limit_offset']; // free the session file, for the other frames to be loaded // but only if debugging is not enabled if (empty($_SESSION['debug'])) { @@ -219,7 +219,7 @@ if (! $GLOBALS['server']) { databases->getHtmlSelectGrouped(true, $_SESSION['userconf']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n"; + echo $GLOBALS['pma']->databases->getHtmlSelectGrouped(true, $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n"; echo '' . "\n" @@ -228,7 +228,7 @@ if (! $GLOBALS['server']) { if (! empty($db)) { echo '
' . "\n"; } - echo $GLOBALS['pma']->databases->getHtmlListGrouped(true, $_SESSION['userconf']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n"; + echo $GLOBALS['pma']->databases->getHtmlListGrouped(true, $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n"; } $_url_params = array('pos' => $pos); PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']); @@ -336,7 +336,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { echo '
' . "\n"; $common_url_query = PMA_generate_common_url(); - PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['userconf']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['userconf']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']); + PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']); } /** diff --git a/sql.php b/sql.php index 5aed2d8a7..b3db27e5d 100644 --- a/sql.php +++ b/sql.php @@ -97,7 +97,7 @@ PMA_displayTable_checkConfigParams(); */ if (isset($find_real_end) && $find_real_end) { $unlim_num_rows = PMA_Table::countRecords($db, $table, true, true); - $_SESSION['userconf']['pos'] = @((ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']) - 1) * $_SESSION['userconf']['max_rows']); + $_SESSION['tmp_user_values']['pos'] = @((ceil($unlim_num_rows / $_SESSION['tmp_user_values']['max_rows']) - 1) * $_SESSION['tmp_user_values']['max_rows']); } @@ -252,13 +252,13 @@ if ($is_select) { // see line 141 } // Do append a "LIMIT" clause? -if ((! $cfg['ShowAll'] || $_SESSION['userconf']['max_rows'] != 'all') +if ((! $cfg['ShowAll'] || $_SESSION['tmp_user_values']['max_rows'] != 'all') && ! ($is_count || $is_export || $is_func || $is_analyse) && isset($analyzed_sql[0]['queryflags']['select_from']) && ! isset($analyzed_sql[0]['queryflags']['offset']) && empty($analyzed_sql[0]['limit_clause']) ) { - $sql_limit_to_append = ' LIMIT ' . $_SESSION['userconf']['pos'] . ', ' . $_SESSION['userconf']['max_rows'] . " "; + $sql_limit_to_append = ' LIMIT ' . $_SESSION['tmp_user_values']['pos'] . ', ' . $_SESSION['tmp_user_values']['max_rows'] . " "; $full_sql_query = $analyzed_sql[0]['section_before_limit'] . "\n" . $sql_limit_to_append . $analyzed_sql[0]['section_after_limit']; /** @@ -373,7 +373,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { $unlim_num_rows = $num_rows; // if we did not append a limit, set this to get a correct // "Showing rows..." message - //$_SESSION['userconf']['max_rows'] = 'all'; + //$_SESSION['tmp_user_values']['max_rows'] = 'all'; } elseif ($is_select) { // c o u n t q u e r y diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index 2aa77d7ed..426fbf82d 100644 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -30,7 +30,7 @@ body { padding: 0; margin: 0.5em; color: ; - background: ; + background: ; } diff --git a/themes/original/css/theme_left.css.php b/themes/original/css/theme_left.css.php index 44fdba737..2f708ec12 100644 --- a/themes/original/css/theme_left.css.php +++ b/themes/original/css/theme_left.css.php @@ -27,7 +27,7 @@ body { font-family: ; - background: ; + background: ; color: ; margin: 0; padding: 0.2em 0.2em 0.2em 0.2em; @@ -86,7 +86,7 @@ button { div#pmalogo { - background-color: ; + background-color: ; padding:.3em; } div#pmalogo, @@ -160,7 +160,7 @@ div#left_tableList ul { margin: 0; padding: 0; font-size: 80%; - background: ; + background: ; } div#left_tableList ul ul { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 34143b8f0..26c34e6e7 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -31,7 +31,7 @@ body { padding: 0; margin: 0.5em; color: ; - background: ; + background: ; }
> > @@ -929,8 +929,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ && ($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn') && (!$GLOBALS['is_header_sent'])) { $vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 3 : 1; - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo "\n"; ?> > @@ -941,8 +941,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } // end vertical mode } - if ($_SESSION['userconf']['disp_direction'] == 'horizontal' - || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') { + if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' + || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { ?>