Hi Bin, after your current tasks, I have more for you.
I believe that mult_submits.inc.php can be further refactored. Also, tbl_printview.php needs some care.
thanks Marc,
Hi Bin, after your current tasks, I have more for you.
I believe that mult_submits.inc.php can be further refactored. Also, tbl_printview.php needs some care.
I will keep them in my mind and I will carry out to do that after I finished the three items mentioned in previous mail. 1. multi_submit 2. server_databases 3. server_privileges
and add more UT for them.
thanks, Bin
Hi Dev,
After the code refactor on libraries/mult_submits.inc.php, we try to merge $what and $query_type on libraries/mult_submits.inc.php
About this issue, I found that :$what and $query_type are used in different branches with different logic.
branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated.
What do other guys think?
thanks, Bin
Le 2013-09-15 11:38, Bin Zu a écrit :
Hi Dev,
After the code refactor on libraries/mult_submits.inc.php, we try to merge $what and $query_type on libraries/mult_submits.inc.php
About this issue, I found that :$what and $query_type are used in different branches with different logic.
branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated.
What do other guys think?
thanks, Bin
Hi Bin, sorry, I'm not sure I understand your message. My point is that when I see this:
$what = $submit_mult;
followed a few lines above by
$query_type = $submit_mult;
my conclusion is that, maybe, $what and $query_type should be merged.
Hi Marc,
Le 2013-09-15 11:38, Bin Zu a écrit :
Hi Dev,
After the code refactor on libraries/mult_submits.inc.php, we try to merge $what and $query_type on libraries/mult_submits.inc.php
About this issue, I found that :$what and $query_type are used in different branches with different logic.
branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated.
What do other guys think?
thanks, Bin
Hi Bin, sorry, I'm not sure I understand your message. My point is that when I see this:
$what = $submit_mult;
followed a few lines above by
$query_type = $submit_mult;
my conclusion is that, maybe, $what and $query_type should be merged.
my meaning is that, from the code, $what and $query_type are used for different actions. $what: case 'add_prefix_tbl': case 'replace_prefix_tbl': case 'copy_tbl_change_prefix': case 'drop_db': case 'drop_tbl': case 'empty_tbl':
$query_type: case 'check_tbl': case 'optimize_tbl': case 'repair_tbl': case 'analyze_tbl': ........
these two kinds of different actions have different logic of code to hanldle it. branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated. so I think the better way is to re-name these two variables to a meanningful name.
what do you think?
thanks, Bin
Bin Zu a écrit :
Hi Marc,
Le 2013-09-15 11:38, Bin Zu a écrit :
Hi Dev,
After the code refactor on libraries/mult_submits.inc.php, we try to merge $what and $query_type on libraries/mult_submits.inc.php
About this issue, I found that :$what and $query_type are used in different branches with different logic.
branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated.
What do other guys think?
thanks, Bin
Hi Bin, sorry, I'm not sure I understand your message. My point is that when I see this:
$what = $submit_mult;
followed a few lines above by
$query_type = $submit_mult;
my conclusion is that, maybe, $what and $query_type should be merged.
my meaning is that, from the code, $what and $query_type are used for different actions. $what: case 'add_prefix_tbl': case 'replace_prefix_tbl': case 'copy_tbl_change_prefix': case 'drop_db': case 'drop_tbl': case 'empty_tbl':
$query_type: case 'check_tbl': case 'optimize_tbl': case 'repair_tbl': case 'analyze_tbl': ........
these two kinds of different actions have different logic of code to hanldle it. branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated. so I think the better way is to re-name these two variables to a meanningful name.
what do you think?
Hi Bin, It's true that there are many code paths for these.
$query_type should be renamed $action_type (because it's not related to a SQL query).
All actions could be sent to $action_type, and there would be another variable (replacing $what) that indicates whether a confirmation form is required or not.
Thanks Marc,
Bin Zu a écrit :
Hi Marc,
Le 2013-09-15 11:38, Bin Zu a écrit :
Hi Dev,
After the code refactor on libraries/mult_submits.inc.php, we try to merge $what and $query_type on libraries/mult_submits.inc.php
About this issue, I found that :$what and $query_type are used in different branches with different logic.
branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated.
What do other guys think?
thanks, Bin
Hi Bin, sorry, I'm not sure I understand your message. My point is that when I see this:
$what = $submit_mult;
followed a few lines above by
$query_type = $submit_mult;
my conclusion is that, maybe, $what and $query_type should be merged.
my meaning is that, from the code, $what and $query_type are used for different actions. $what: case 'add_prefix_tbl': case 'replace_prefix_tbl': case 'copy_tbl_change_prefix': case 'drop_db': case 'drop_tbl': case 'empty_tbl':
$query_type: case 'check_tbl': case 'optimize_tbl': case 'repair_tbl': case 'analyze_tbl': ........
these two kinds of different actions have different logic of code to hanldle it. branch 1 : about $what : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
branch 2: about $query_type: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/mult_submits....
If we merge them together, the two branches should be merged as well. so the logic will be more complicated. so I think the better way is to re-name these two variables to a meanningful name.
what do you think?
Hi Bin, It's true that there are many code paths for these.
$query_type should be renamed $action_type (because it's not related to a SQL query).
All actions could be sent to $action_type, and there would be another variable (replacing $what) that indicates whether a confirmation form is required or not.
thanks, I think I can follow this instruction to refactor these two variables.
thanks, Bin