Skip to content

Commit

Permalink
Fix bug #4245
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Jan 29, 2014
1 parent c1c50b5 commit 212a7e5
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions libraries/sql.lib.php
Expand Up @@ -2266,24 +2266,23 @@ function PMA_executeQueryAndSendQueryResponse($analyzed_sql_results,


include 'libraries/DisplayResults.class.php'; include 'libraries/DisplayResults.class.php';


$displayResultsObject = new PMA_DisplayResults(
$GLOBALS['db'], $GLOBALS['table'], $GLOBALS['goto'], $GLOBALS['sql_query']
);

$displayResultsObject->setConfigParamsForDisplayTable();

// assign default full_sql_query
$full_sql_query = $sql_query;

// Handle remembered sorting order, only for single table query // Handle remembered sorting order, only for single table query
// Handling is not required when it's a union query // Handling is not required when it's a union query
// (the parser never sets the 'union' key to 0) // (the parser never sets the 'union' key to 0)
if (PMA_isRememberSortingOrder($analyzed_sql_results) if (PMA_isRememberSortingOrder($analyzed_sql_results)
&& ! isset($analyzed_sql_results['analyzed_sql'][0]['queryflags']['union']) && ! isset($analyzed_sql_results['analyzed_sql'][0]['queryflags']['union'])
) { ) {
PMA_handleSortOrder($db, $table, $analyzed_sql_results, $full_sql_query); PMA_handleSortOrder($db, $table, $analyzed_sql_results, $sql_query);
} }


$displayResultsObject = new PMA_DisplayResults(
$GLOBALS['db'], $GLOBALS['table'], $GLOBALS['goto'], $sql_query
);
$displayResultsObject->setConfigParamsForDisplayTable();

// assign default full_sql_query
$full_sql_query = $sql_query;

// Do append a "LIMIT" clause? // Do append a "LIMIT" clause?
if (PMA_isAppendLimitClause($analyzed_sql_results)) { if (PMA_isAppendLimitClause($analyzed_sql_results)) {
list($sql_limit_to_append, list($sql_limit_to_append,
Expand Down

0 comments on commit 212a7e5

Please sign in to comment.