Merge branch 'release-4.0.8'

This commit is contained in:
Daniel Kraus
2017-02-16 06:30:16 +01:00
5 changed files with 18 additions and 6 deletions

10
NEWS
View File

@ -1,3 +1,13 @@
Version 4.0.8 (2017-02-16)
------------------------------------------------------------------------
- Fix: Do not link inside <gallery>...</gallery> tags.
- Fix: The special page and the maintenance script did not work in MW 1.28.
- Fix: The special page did not work.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Version 4.0.7 (2017-01-02)
------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@
],
"type": "parserhook",
"url": "https://www.mediawiki.org/wiki/Extension:LinkTitles",
"version": "4.0.7",
"version": "4.0.8",
"license-name": "GPL-2.0+",
"descriptionmsg": "linktitles-desc",
"requires": {

View File

@ -220,11 +220,12 @@ class Extension {
$newText = self::parseContent($title, $text);
if ( $text != $newText ) {
$content = $content->getContentHandler()->unserializeContent( $newText );
$page->doQuickEditContent(
$page->doEditContent(
$content,
$context->getUser(),
"Links to existing pages added by LinkTitles bot.", // TODO: i18n
true // minor modification
EDIT_MINOR | EDIT_FORCE_BOT,
false, // baseRevId
$context->getUser()
);
};
return true;
@ -471,6 +472,7 @@ private static function BuildDelimiters() {
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
'<pre>.*?<\/pre>|<html>.*?<\/html>|' . // pre/html
'<script>.*?<\/script>|' . // script
'<gallery>.*?<\/gallery>|' . // gallery
'<div.+?>|<\/div>|' . // attributes of div elements
'<span.+?>|<\/span>|' . // attributes of span elements
'<file>[^<]*<\/file>|' . // stuff inside file elements

View File

@ -133,7 +133,7 @@ class Special extends \SpecialPage {
// Iterate through the pages; break if a time limit is exceeded.
foreach ( $res as $row ) {
$curTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title);
$curTitle = \Title::makeTitleSafe( $row->page_namespace, $row->page_title);
Extension::processPage($curTitle, $this->getContext());
$start += 1;