-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor server_import and related files #542
Conversation
…o server_refactor2
…o server_refactor2
1. render html at once 2. split js code
…o server_refactor2
2. split long code to functions 3. move function to display_import.lib.php 4. fix the included file: table, database, server
…o server_refactor2
Hi Marc, changes:
thanks for your review |
@@ -139,6 +139,9 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false, | |||
} | |||
$sql_query = $import_run_buffer['sql']; | |||
$sql_data['valid_sql'][] = $import_run_buffer['sql']; | |||
if(! isset($sql_data['valid_queries'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is to fix undefined error of $sql_data['valid_queries'] after imported
Bin, |
thanks Marc, I am fixing the issues now. thanks |
Hi Bin, |
Hi Marc, I just test from my side on database, table, server levels import. the import process is working well and not error output. but I have no idea about the apc testing.. |
Bin, |
thanks, it is useful. I will test upload bar branch now. BTW, the table name issues have been fixed. |
2. using jquery getScript to load js file
still have some upload bar issue. close it. will reopen when fixed. thanks |
Hi Marc, for the js part, If I split to a separated file, the js file can't use the PHP variable. so now I add a new function to render javascript out : PMA_getHtmlForImportNoPlugin for this part of js code, I will refactor more if I have idea to split js to a separated file. thanks |
I have tested both upload on progress and apc. the status bar can working well. but the process is so quick, so if you want to see the bar, you can set "if (finished == true)" to "if (false)" |
the side bar should be reloaded when import finished |
Hi Bin, |
Hi Marc, Yes. I have no idea how to put this line about reload the navigation panel when import finished. I will discuss with other developers on mail list and make more investigations. I will reopen the pull request when fixing this issue. BTW, other features are all working well. thanks |
Hi Bin, |
…o server_refactor2
thanks Marc, I have fixed all the issues about this pull request. and I tested both on process and apc upload for database, server, table import. thanks for your review. |
$html .= ' .show(); '; | ||
$html .= ' $("#import_form_status").load("import_status.php?' | ||
. 'message=true&' . $import_url . '"); '; | ||
$html .= ' PMA_reloadNavigation(); '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is to reload the navigation panel when import finished on JS level.
thanks Marc's advice
refactor server_import and related files
Good job! |
No description provided.