Extension:DataTable2/History

Bugfixes

 * Removed trailing blank lines in DataTable2.php. (Thanks to User:Cruickshanks for spotting this.)

Bugfixes

 * Removed wrong sorting of data when rendering a table without a template. (Thanks to User:Cruickshanks for spotting this.)

Bugfixes

 * Minor fixes to avoid PHP warnings.
 * Minor fixes to messages.

Configuration changes

 * The configuration variable  is not used any more. Detail tracking is now enabled by default and can be disabled by setting the message   to a single dash.
 * The messages are now stored in the new JSON format. This implies that you need to modify the message  if you modify.
 * The message  is not used any more.
 * The messages  have been simplified and do not take parameters any more.
 * Defaults are now provided for the messages.
 * The  must not contain wiki markup any more. Any markup such as links should be put into the summary messages.

New features

 * Special:DataTable2Tables now contains links to tracking categories.

Bugfixes

 * Pages using DataTable2 data through the Lua API are now added to the appropriate tracking categories and assigned dependencies the same way as pages using DataTable2 data through tags or parser functions. If you already have such pages, you can fix the categories and dependencies either by performing a null edit on each page or by executing the script . Note that the latter may take a considerable amount of time.
 * is set to  in DataTable2::init if unset, so that it is sufficient to customize the latter if it is desired to have them equal.
 * Same for  /.
 * Multiple XML comments within one record are now handled correctly.
 * Improved text of  messages.

Languages updated

 * Support was added for Italian (it).

Other Changes

 * For the messages  and ,  the text output mode is now used instead of plain. This means that all ' – ' are transformed.
 * The special pages have been re-implemented with common code collected in common base classes.
 * Special:DataTable2Data is now implemented with html table syntax rather than wiki table syntax.

Bugfixes

 * Fix DataTable2Parser::_parseWiki, handling gracefully the case that there are more columns than column names.
 * Fix DataTable2DataPager::__construct, now using DataTable2::singleton instead of a global DataTable2 object.

Bugfixes

 * $wgExtensionFunctions is used so that Manual:Config script now works.

Configuration changes
It is useful to install the Extension:Scribunto extension together with DataTable2 since DataTable2 provides support for it. It does not matter which one is mentioned first in.

Bugfixes

 * The  tag as well as the parser functions   and   now increment the expensive function count.
 * now returns an enpty string when the requested column is null (thus avoiding warnings in the PHP log).

New features
The DataTable2 extension now includes a Lua library for Extension:Scribunto, allowing Lua modules to directly access the stored data.

New languages
Messages are now available in German as well.

Version 0.8
A number of breaking changes has been introduced which in some circumstances require more work from wiki editors, but which should make the behaviour of the extension (and the php code) easier to understand and align it better with the way most extensions work.

Since a it might take some time to migrate from the old to the new version, the new version has been named DataTable2 (with a tag &lt;datatable2&gt; and all other tags and parser function names prefixed with dt2-) so that it can co-exist with the old version in the same wiki installation.

Configuration changes
All configuration parameters are new.

Changes to the data model
Data is stored in the table  much the same way as it was before in. Columns can now be given names, which are stored in the table.

Since the column  does not have a NOT NULL constraint any more, you can use the table to make data from sources other than wikipages available within your wiki. To do that, you can either insert other data in the table with any means you like, or create a view as a union of the table with some other table(s) and set the configuration parameter  to the name of that view.

Once you have finished migration of your wiki from DataTable to DataTable2, don't forget to drop the old table.

Changes to the &lt;datatable2&gt; tag

 * Attributes are not subject to template replacement any more. This is because the attributes fs and rs are needed in the save triggers, where no frame information is available, and in general it is not common in extensions to apply replacement to tag arguments.
 * An empty  tag caused the content to be rendered within a wiki table. Empty   tags are now ignored; to force a wrapping table, you need to do one of the following:
 * Supply an nonempty  tag.
 * Supply a nonempty  attribute.
 * Do neither supply a  attribute nor a   tag.
 * The contents of &lt;head&gt; used to be wrapped between |- items so that they worked even when the user forgot some wiki table markup. This is not the case any more, hence it is now the user's responsibility to write correct wikitext.
 * The attributes  are not supported any more. Instead, there is a new attribute   which is copied verbatim to the template invocation for each row.
 * When no template was defined (neither as a  attribute nor as a   tag), the data used to be rendered using default field and record separators. Now, the data is rendered in a wiki table.
 * In the data, pipe characters within templates or links were interpreted as pipe characters rather than field separators. This implied a rather complex and probably error-prone parsing algorithm which has been abandoned in favor of a simple split by pipe. Hence, you need to replace pipe characters within templates or links with the template, or use a different field separator.

Bugfixes
The WHERE and ORDER BY clauses are now sanitized to protect against SQL injection.

New features
Many arguments to &lt;datatable2&gt; as well as all means to retrieve data are new.

Other changes
The code has been reviewed in order to comply better with the guidelines on mediawiki.org.

Old versions
Release numbers lower than 0.8 refer to the old DataTable extension.