diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 665298b49..6f7064a6b 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1039,6 +1039,9 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view } else { // Parse SQL if needed $parsed_sql = PMA_SQP_parse($query_base); + if (PMA_SQP_isError()) { + unset($parsed_sql); + } } // Analyze it @@ -1242,8 +1245,8 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view } echo '
' . "\n"; - // If we are in an Ajax request, we have most probably been called in - // PMA_ajaxResponse(). Hence, collect the buffer contents and return it + // If we are in an Ajax request, we have most probably been called in + // PMA_ajaxResponse(). Hence, collect the buffer contents and return it // to PMA_ajaxResponse(), which will encode it for JSON. if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) { $buffer_contents = ob_get_contents(); diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 16ac8c9d9..bb16bbf7f 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -717,10 +717,6 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ $GLOBALS['mime_map'] = PMA_getMIME($db, $table); } - if ($is_display['sort_lnk'] == '1') { - $select_expr = $analyzed_sql[0]['select_expr_clause']; - } - // See if we have to highlight any header fields of a WHERE query. // Uses SQL-Parser results. $highlight_columns = array(); @@ -1299,7 +1295,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // reset $class from $data_inline_edit_class to '' as we can't edit binary data $class = ''; - + if (stristr($field_flags, 'BINARY')) { if (!isset($row[$i]) || is_null($row[$i])) { $vertical_display['data'][$row_no][$i] = ' NULL' . "\n"; @@ -2094,7 +2090,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) 'submit_mult_change', __('Change'), 'b_edit.png'); PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_delete', $delete_text, 'b_drop.png'); - if ($analyzed_sql[0]['querytype'] == 'SELECT') { + if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT') { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', __('Export'), 'b_tblexport.png'); @@ -2352,7 +2348,7 @@ function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed } // continue the tag started before calling this function: - $result = $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . $nowrap + $result = $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . $nowrap . ' ' . ($is_field_truncated ? ' truncated' : '') . ($transform_function != $default_function ? ' transformed' : '') . (isset($map[$meta->name]) ? ' relation' : '') diff --git a/libraries/import/ods.php b/libraries/import/ods.php index 7df7edcbf..c0db7afbf 100644 --- a/libraries/import/ods.php +++ b/libraries/import/ods.php @@ -90,7 +90,7 @@ $rows = array(); /* Iterate over tables */ foreach ($sheets as $sheet) { - $col_names_in_first_row = $_REQUEST['ods_col_names']; + $col_names_in_first_row = isset($_REQUEST['ods_col_names']); /* Iterate over rows */ foreach ($sheet as $row) { diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index 8636d0285..54ef5d490 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -216,9 +216,6 @@ class PMA_User_Schema . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($this->choosenPage) . '\''; $page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option); $array_sh_page = array(); - $draginit = ''; - $reset_draginit = ''; - $i = 0; while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) { $array_sh_page[] = $temp_sh_page; } @@ -229,7 +226,7 @@ class PMA_User_Schema if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) { $with_field_names = TRUE; } - $this->_displayScratchboardTables($array_sh_page,$draginit,$reset_draginit); + $this->_displayScratchboardTables($array_sh_page); ?>
@@ -464,7 +461,7 @@ class PMA_User_Schema * @return void * @access private */ - private function _displayScratchboardTables($array_sh_page,$draginit,$reset_draginit) + private function _displayScratchboardTables($array_sh_page) { global $with_field_names,$cfg,$db; ?> @@ -475,12 +472,15 @@ class PMA_User_Schema