diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-09-12 22:51:21 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-09-12 22:51:21 +0300 |
commit | 1354b45b128051c0c54a26f4f21cb7485f958350 (patch) | |
tree | ad0a29bb6ba6a7aebe61ecc0a74ed2f6b7bf9db1 /import.php | |
parent | 9ecdd9c80ae5c9865e8e79e0802052d6d391e34f (diff) |
Refactor parse_analyze function to static method
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'import.php')
-rw-r--r-- | import.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/import.php b/import.php index 65780c1d34..3e462d983d 100644 --- a/import.php +++ b/import.php @@ -11,6 +11,7 @@ use PhpMyAdmin\Core; use PhpMyAdmin\Encoding; use PhpMyAdmin\File; use PhpMyAdmin\Import; +use PhpMyAdmin\ParseAnalyze; use PhpMyAdmin\Plugins\ImportPlugin; use PhpMyAdmin\Response; use PhpMyAdmin\Sql; @@ -637,13 +638,11 @@ if (isset($message)) { // can choke on it so avoid parsing) $sqlLength = mb_strlen($sql_query); if ($sqlLength <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { - include_once 'libraries/parse_analyze.lib.php'; - list( $analyzed_sql_results, $db, $table_from_sql - ) = PMA_parseAnalyze($sql_query, $db); + ) = ParseAnalyze::sqlQuery($sql_query, $db); // @todo: possibly refactor extract($analyzed_sql_results); @@ -675,12 +674,11 @@ if ($go_sql) { foreach ($sql_queries as $sql_query) { // parse sql query - include_once 'libraries/parse_analyze.lib.php'; list( $analyzed_sql_results, $db, $table_from_sql - ) = PMA_parseAnalyze($sql_query, $db); + ) = ParseAnalyze::sqlQuery($sql_query, $db); // @todo: possibly refactor extract($analyzed_sql_results); |