phpmyadmin/phpmyadmin — pull request #27 by alexukf (2012-04-13 08:35:15+00:00)
Title: export mediawiki outputs content instead of structure

Currently, the export plugin for the MediaWiki format only exports table structure ( the result of SHOW [FULL] COLUMNS for MySQL and similar for Drizzle). I've modified it so that it exports the actual content in the table.

ChangeLog for export mediawiki:
- Prints actual content of the table instead of table structure;
- Uses the new PMA_DBI_get_column_names() function instead of PMA_DBI_get_columns(), in order to get only the results that matter for the table header;
- Removes the old colours: #ffdead and #f9f9f9, the border, cellpadding and cellspacing;
- Uses wikitable class instead, with nice shades of gray and minimal cellpadding and cellspacing. Only kept the old text-align:center attribute;
- Uses $crlf instead of "\n", and also two line separators instead of four after the end of a table.

As future improvements, configuration settings could be added:
- $cfg['Export']['media_wiki_caption'] = false; -> in this case, the table caption will not be exported;
- $cfg['Export']['media_wiki_col_names'] = true; -> setting this to false will result in the table header not being exported.

I've completely removed the export table structure functionality because I don't find it very useful, but a configuration setting could be added and export that as well, or only that, if desired.