[Phpmyadmin-devel] Export plugin

Marc Delisle marc at infomarc.info
Wed Feb 22 19:02:28 CET 2012


Le 2012-02-22 10:09, Alex UKF a écrit :
> Hello,
> 
> I was trying to implement some ideas of mine related to the export plugin,
> and I
> have a small question.
> 
> I saw that export.php uses a function called PMA_getPlugins (from
> libraries/plugin_interface.lib.php) to get the export list with all of the
> plugins.
> That function includes all the files in the libraries/export folder, which
> in turn
> define the options and functions for each of the plugins. After the user
> chooses a
> format and submits, one of the exports is selected and used.
> 
> I was wondering if there is any reason for using that $plugin_list ( in
> this case
> $export_list ) or if that variable is actually needed somewhere else except
> the
> export.php and libraries/display_export.lib.php, where it displays the list
> of
> export plugins. Because if not, I was thinking that the export list could
> be
> replaced with a single element which will be an instance of one of the
> export
> classes.
> 
> This way, all the other export plugins don't need to be included, and only
> one
> export class will be instantiated and its output functions will be used. I
> tested
> this scenario and it works, but I don't know if I may cause something else
> to
> malfunction in some part. Would you have any objections for such a
> replacement?
> 
> Thanks,
> Alex

Alex,

$export_list is used only in export.php and
libraries/display_export.lib.php, so your idea looks good.

However, beware that someone could have placed a custom script under
libraries/export and would expect his custom export format to be shown.


-- 
Marc Delisle
http://infomarc.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120222/86def5a4/attachment.sig>


More information about the Developers mailing list