You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-25 06:39:48 +03:00
bug 4245 fix with minimum changes
Signed-off-by: Sampath Liyanage <plbsam@gmail.com>
This commit is contained in:
@@ -1012,7 +1012,17 @@ class PMA_Util
|
||||
$sql_query = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($GLOBALS['db']) && isset($GLOBALS['table'])){
|
||||
// Parse and analyze the query
|
||||
$analyzed_sql_results = PMA_SQP_getParserAnalyzeMap(
|
||||
$sql_query, $GLOBALS['db']);
|
||||
|
||||
// Synchronize message(query) with table
|
||||
PMA_handleSortOrder($GLOBALS['db'], $GLOBALS['table'],
|
||||
$analyzed_sql_results, $sql_query);
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['using_bookmark_message'])) {
|
||||
$retval .= $GLOBALS['using_bookmark_message']->getDisplay();
|
||||
unset($GLOBALS['using_bookmark_message']);
|
||||
|
||||
@@ -227,7 +227,8 @@ function PMA_getTableHtmlForMultipleQueries(
|
||||
function PMA_handleSortOrder($db, $table, &$analyzed_sql_results, &$full_sql_query)
|
||||
{
|
||||
$pmatable = new PMA_Table($table, $db);
|
||||
if (empty($analyzed_sql_results['analyzed_sql'][0]['order_by_clause'])) {
|
||||
if (empty($analyzed_sql_results['analyzed_sql'][0]['order_by_clause'])
|
||||
&& isset($GLOBALS['default_query']) && $GLOBALS['default_query']) {
|
||||
$sorted_col = $pmatable->getUiProp(PMA_Table::PROP_SORTED_COLUMN);
|
||||
if ($sorted_col) {
|
||||
//remove the tablename from retrieved preference
|
||||
@@ -1170,6 +1171,7 @@ function PMA_appendLimitClause($full_sql_query, $analyzed_sql, $display_query)
|
||||
*/
|
||||
function PMA_getDefaultSqlQueryForBrowse($db, $table)
|
||||
{
|
||||
$GLOBALS['default_query'] = true;
|
||||
include_once 'libraries/bookmark.lib.php';
|
||||
$book_sql_query = PMA_Bookmark_get(
|
||||
$db,
|
||||
|
||||
Reference in New Issue
Block a user