From e92107b9b55bdb351fbaabb3b948bcc6e0ad0361 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 24 Oct 2014 13:00:23 -0400 Subject: [PATCH] Remove dead code Signed-off-by: Marc Delisle --- libraries/sql.lib.php | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/libraries/sql.lib.php b/libraries/sql.lib.php index 91ac0c2fba..cefccfb4dd 100644 --- a/libraries/sql.lib.php +++ b/libraries/sql.lib.php @@ -1129,12 +1129,11 @@ function PMA_getEnumOrSetValues($db, $table, $columnType) /** * Function to append the limit clause * - * @param array $analyzed_sql analyzed sql query - * @param String $display_query display query + * @param array $analyzed_sql analyzed sql query * * @return array */ -function PMA_appendLimitClause($analyzed_sql, $display_query) +function PMA_appendLimitClause($analyzed_sql) { $sql_limit_to_append = ' LIMIT ' . $_SESSION['tmpval']['pos'] . ', ' . $_SESSION['tmpval']['max_rows'] . " "; @@ -1143,26 +1142,6 @@ function PMA_appendLimitClause($analyzed_sql, $display_query) $sql_limit_to_append ); - /** - * @todo pretty printing of this modified query - */ - if ($display_query) { - // if the analysis of the original query revealed that we found - // a section_after_limit, we now have to analyze $display_query - // to display it correctly - - if (! empty($analyzed_sql[0]['section_after_limit']) - && trim($analyzed_sql[0]['section_after_limit']) != ';' - ) { - $analyzed_display_query = PMA_SQP_analyze( - PMA_SQP_parse($display_query) - ); - $display_query = $analyzed_display_query[0]['section_before_limit'] - . "\n" . $sql_limit_to_append - . $analyzed_display_query[0]['section_after_limit']; - } - } - return array($sql_limit_to_append, $full_sql_query); } @@ -2364,7 +2343,7 @@ function PMA_executeQueryAndSendQueryResponse($analyzed_sql_results, // Do append a "LIMIT" clause? if (PMA_isAppendLimitClause($analyzed_sql_results)) { list($sql_limit_to_append, $full_sql_query) = PMA_appendLimitClause( - $analyzed_sql_results['analyzed_sql'], isset($display_query) + $analyzed_sql_results['analyzed_sql'] ); } else { $sql_limit_to_append = '';