phpmyadmin/phpmyadmin — pull request #49 by alexukf (2012-04-28 23:34:00+00:00)
Title: Add import plugin for the mediawiki format

I know that mediawiki is not such a popular format to export to and import from, but I wanted to create a new plugin in order to have a better understanding of the whole import process and I figured that some use cases may actually exist. For example, if somebody wants to import a table from:
- wikipedia;
- redmine;
- other crm wikis or any other mediawiki pages;
- exported mediawiki file from phpMyAdmin (which may now act as a backup the user exported before altering some tables).

I've listed here some implementation details:
- Before importing, the user can select the import type:
- Memory saving (will import one table at a time). Recommended for a large number of tables.
- Faster, but memory consuming (will save all tables into memory). Recommended for small amounts of data.
- A new default configuration setting is added to provide the above mentioned functionality:
$cfg['Import']['mediawiki_performance_indicator'] = 'memory';
The other value it can take is 'speed'.
- Table names are imported from comments, otherwise generic names are given: TABLE 1, TABLE 2, etc;
- If the table headers are empty, the columns will be imported as COL 1, COL 2, etc;
- Provides parsing of the mediawiki format for tables as seen at [0] and treats special cases such as split lines when reading chunk by chunk.

[0] http://www.mediawiki.org/wiki/Help:Tables