The anonymous callback functions that were handed over to
preg_replace_callback called private static methods of the LinkTitles class,
which worked fine with PHP 5.5.9, but not with PHP 5.3.3.
The functions were not turned (back) into static methods, and the callback
is given in the array form, as described in the PHP documentation.
WikiPage::doEditContent was extremely slow, because it updated link tables
etc. For batch processing, we now use WikiPage::doQuickEditContent, which is
considerably faster.
The checks for whether a page is a potential link target or not (depending
on the absence of the __NOAUTOLINKTARGET__ magic word and if it is not a
redirect to the current page) have now been moved into the callback
functions, so that they are only performed if a page really is a candidate
for linking (i.e, its title occurs on the currently edited page).
The change resulted in a ~10-fold increase in speed.
Added two new configuration variables, $wgLinkTitlesCheckRedirect and
$wgLinkTitlesEnableNoTargetMagicWord, that can be used to increase
performance. If both are overridden to be false, the target page content
will not be fetched from the database to check for redirect or the
occurrence of a magic word, which saves a lot of time.
Added code to check if a target page redirects to the current page, and
prevents linking to that target page. Note that this does not catch
situations where a page title exists twice, once with first capital letter
and once with first lowercase letter (should happen on test systems only).
The preg_replace_callback callback functions were removed as static
functions and declared inline; the callback function for $wgCapitalLinks ==
false was simplified to speed up the process.
The regular expression used to split the page content had a few pipe
characters in the wrong places, due to the previous 'cleaning-up' of the
convoluted expression for version 2.3.0.
If a page title started with a slash, the algorithm to deal with leading
capitals would produce a faulty regexp by accessing $escapedTitle[0] and
substr($escapedTitle, 1), which would only capture the slash that escapes
the slash.
Also fix small bug in template detection (make expression non-greedy).
Page titles are now properly escaped using preg_quote() to prevent regexp
compilation errors if the title contains characters with special meanings in
regular expressions.
If a page title does has a different case than an occurrence of the same
word(s) on the page that is being edited, the extension will now
automatically generate 'piped' links such as [[Linking titles|Linking
Titles]].