[Phpmyadmin-devel] About $GLOBALS['reload'] when import finished

Marc Delisle marc at infomarc.info
Mon Jul 29 11:22:13 CEST 2013

Le 2013-07-28 12:10, Bin Zu a écrit :
> Hi guys,
> I am refactoring the code about display import : libraries/display_import.lib.php
> [Codes]
> one issue is to render HTML (including Javascript) at once on PHP.
> the old code:  https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/display_import.lib.php
> refactor code:  https://github.com/xmujay/phpmyadmin/blob/2660fb048166b42381d4f0b6ae627f8f1a987740/libraries/display_import.lib.php

Hi Bin,
by the way, in your refactored code, the function 
PMA_getHtmlForImportNoPlugin() should be renamed. It does not contain 
code for the situation when there is no plugin, but when there _is_ a 

> [Situation]
> One diffcult issue is :
> https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/display_import.lib.php#L140
> this line means, when the import  finished, $GLOBALS['reload']= true, and the navigation panel will be refreshed.

This has for effect of reloading both navigation and main panel.

> But now I render all JS on PHP. (It will be moved to seperated JS file on the future)
> the corresponding code : https://github.com/xmujay/phpmyadmin/blob/2660fb048166b42381d4f0b6ae627f8f1a987740/libraries/display_import.lib.php#L568
> [Question]
> my question is, where should I put the code "$GLOBALS['reload']", so that the navigation panel will be refreshed after import
> It is not woking after L568, since the HTML is not not rendered yet.

If you can do it at the js level, use this:

Marc Delisle

More information about the Developers mailing list