mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Merge branch 'release-5.0.0' into develop
This commit is contained in:
2
Doxyfile
2
Doxyfile
@ -431,7 +431,7 @@ EXTRACT_ALL = NO
|
|||||||
# be included in the documentation.
|
# be included in the documentation.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
EXTRACT_PRIVATE = NO
|
EXTRACT_PRIVATE = YES
|
||||||
|
|
||||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||||
# scope will be included in the documentation.
|
# scope will be included in the documentation.
|
||||||
|
41
NEWS
41
NEWS
@ -1,11 +1,24 @@
|
|||||||
Version 7.1.0 (2017-08-24)
|
Version 5.0.0 (2017-09-01)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Change: The $wgLinkTitlesBatchTimeLimit configuration variable was renamed to $wgLinkTitlesSpecialPageReloadAfter.
|
||||||
|
- Fix: Blacklist did not always work properly
|
||||||
|
- Fix: Contents of <noautolink> tags are now properly parsed as Wiki text.
|
||||||
|
- Fix: Links to other namespaces were not prefixed properly.
|
||||||
|
- Fix: The firstOnly option finally also works if a page contains a link to a given other page that was not currently added by the extension, i.e. that existed prior to an edit or that was manually added.
|
||||||
|
- Fix: When $wgCapitalLinks was true, the extension would not work with non-latin languages.
|
||||||
|
|
||||||
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.1.0 (2017-08-25)
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Fix: Properly handle templates that include other templates.
|
||||||
- New: Mark sections that are not to be automatically linked with the new `<noautolinks>..</noautolinks>` tag.
|
- New: Mark sections that are not to be automatically linked with the new `<noautolinks>..</noautolinks>` tag.
|
||||||
- New: Mark sections that are to be automatically linked with the new `<autolinks>..</autolinks>` tag. This tag only makes sense on pages with the `__NOAUTOLINKS__` magic word, or if both `$wgLinkTitlesParseOnEdit` and `$wgLinkTitlesParseOnRender` are set to false. Note that this tag is parsed when a page is rendered, not when it is saved. Therefore, the links will not appear in the page source.
|
- New: Mark sections that are to be automatically linked with the new `<autolinks>..</autolinks>` tag. This tag only makes sense on pages with the `__NOAUTOLINKS__` magic word, or if both `$wgLinkTitlesParseOnEdit` and `$wgLinkTitlesParseOnRender` are set to false. Note that this tag is parsed when a page is rendered, not when it is saved. Therefore, the links will not appear in the page source.
|
||||||
- Fix: Properly handle templates that include other templates.
|
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.9 (2017-03-21)
|
Version 4.0.9 (2017-03-21)
|
||||||
@ -13,7 +26,7 @@ Version 4.0.9 (2017-03-21)
|
|||||||
|
|
||||||
- Fix: __NOAUTOLINKS__ was not respected during rendering.
|
- Fix: __NOAUTOLINKS__ was not respected during rendering.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.8 (2017-02-16)
|
Version 4.0.8 (2017-02-16)
|
||||||
@ -23,7 +36,7 @@ Version 4.0.8 (2017-02-16)
|
|||||||
- Fix: The special page and the maintenance script did not work in MW 1.28.
|
- Fix: The special page and the maintenance script did not work in MW 1.28.
|
||||||
- Fix: The special page did not work.
|
- Fix: The special page did not work.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.7 (2017-01-02)
|
Version 4.0.7 (2017-01-02)
|
||||||
@ -31,7 +44,7 @@ Version 4.0.7 (2017-01-02)
|
|||||||
|
|
||||||
- Improvement: Increase performance of special page and maintenance script.
|
- Improvement: Increase performance of special page and maintenance script.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.6 (2016-12-28)
|
Version 4.0.6 (2016-12-28)
|
||||||
@ -40,7 +53,7 @@ Version 4.0.6 (2016-12-28)
|
|||||||
- Fix: Bug fixes.
|
- Fix: Bug fixes.
|
||||||
- Fix: Custom namespace weights were not respected.
|
- Fix: Custom namespace weights were not respected.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.5 (2016-12-14)
|
Version 4.0.5 (2016-12-14)
|
||||||
@ -50,7 +63,7 @@ Version 4.0.5 (2016-12-14)
|
|||||||
- Fix: Remove leftover error log call.
|
- Fix: Remove leftover error log call.
|
||||||
- Improvement: Refactored maintenance script, improving user interaction.
|
- Improvement: Refactored maintenance script, improving user interaction.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.4 (2016-11-30)
|
Version 4.0.4 (2016-11-30)
|
||||||
@ -58,7 +71,7 @@ Version 4.0.4 (2016-11-30)
|
|||||||
|
|
||||||
- Fix: Do not link titles twice if $wgLinkTitlesFirstOnly and $wgLinkTitlesSmartMode are both true.
|
- Fix: Do not link titles twice if $wgLinkTitlesFirstOnly and $wgLinkTitlesSmartMode are both true.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.3 (2016-11-22)
|
Version 4.0.3 (2016-11-22)
|
||||||
@ -66,7 +79,7 @@ Version 4.0.3 (2016-11-22)
|
|||||||
|
|
||||||
- Fix: __NOAUTOLINKS__ magic word would not be respected when saving an edited page.
|
- Fix: __NOAUTOLINKS__ magic word would not be respected when saving an edited page.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.2 (2016-11-09)
|
Version 4.0.2 (2016-11-09)
|
||||||
@ -75,7 +88,7 @@ Version 4.0.2 (2016-11-09)
|
|||||||
- FIX: Removed a fatal bug in the LinkTitles_Maintenance script.
|
- FIX: Removed a fatal bug in the LinkTitles_Maintenance script.
|
||||||
- FIX: Repaired severely broken namespaces support.
|
- FIX: Repaired severely broken namespaces support.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.1 (2016-11-08)
|
Version 4.0.1 (2016-11-08)
|
||||||
@ -83,7 +96,7 @@ Version 4.0.1 (2016-11-08)
|
|||||||
|
|
||||||
- FIX: Prevent syntax error when accessing special page.
|
- FIX: Prevent syntax error when accessing special page.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 4.0.0 (2016-11-05)
|
Version 4.0.0 (2016-11-05)
|
||||||
@ -95,7 +108,7 @@ Version 4.0.0 (2016-11-05)
|
|||||||
- NEW: Support namespaces.
|
- NEW: Support namespaces.
|
||||||
- NEW: Use the new extension format introduced by MediaWiki 1.25; the extension will no longer run with older MediaWiki versions.
|
- NEW: Use the new extension format introduced by MediaWiki 1.25; the extension will no longer run with older MediaWiki versions.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
Version 3.1.0. (2015-02-05)
|
Version 3.1.0. (2015-02-05)
|
||||||
@ -103,7 +116,7 @@ Version 3.1.0. (2015-02-05)
|
|||||||
|
|
||||||
- IMPROVEMENT: Do not link inside <file>...</file> tags.
|
- IMPROVEMENT: Do not link inside <file>...</file> tags.
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ To add page titles to the black list, you can use statements such as
|
|||||||
in your `LocalSettings.php` file. Use one of these for every page title that you want to
|
in your `LocalSettings.php` file. Use one of these for every page title that you want to
|
||||||
put on the black list. Alternatively, you can specify the entire array:
|
put on the black list. Alternatively, you can specify the entire array:
|
||||||
|
|
||||||
$wgLinkTitlesBlackList[] = [ 'Some special page title', 'Another one' ];
|
$wgLinkTitlesBlackList = [ 'Some special page title', 'Another one' ];
|
||||||
|
|
||||||
Keep in mind that a MediaWiki page title always starts with a capital letter
|
Keep in mind that a MediaWiki page title always starts with a capital letter
|
||||||
unless you have `$wgCapitalLinks = false;` in your `LocalSettings.php`.
|
unless you have `$wgCapitalLinks = false;` in your `LocalSettings.php`.
|
||||||
|
@ -4,11 +4,12 @@
|
|||||||
"[https://www.mediawiki.org/wiki/User:Bovender Daniel Kraus (bovender)]",
|
"[https://www.mediawiki.org/wiki/User:Bovender Daniel Kraus (bovender)]",
|
||||||
"Ulrich Strauss (c0nnex)",
|
"Ulrich Strauss (c0nnex)",
|
||||||
"Brent Laabs (labster)",
|
"Brent Laabs (labster)",
|
||||||
"tetsuya-zama"
|
"tetsuya-zama",
|
||||||
|
"yoshida"
|
||||||
],
|
],
|
||||||
"type": "parserhook",
|
"type": "parserhook",
|
||||||
"url": "https://www.mediawiki.org/wiki/Extension:LinkTitles",
|
"url": "https://www.mediawiki.org/wiki/Extension:LinkTitles",
|
||||||
"version": "4.1.0",
|
"version": "5.0.0",
|
||||||
"license-name": "GPL-2.0+",
|
"license-name": "GPL-2.0+",
|
||||||
"descriptionmsg": "linktitles-desc",
|
"descriptionmsg": "linktitles-desc",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
2
gh-pages
2
gh-pages
Submodule gh-pages updated: 076be774a2...b89d3cf098
@ -76,8 +76,8 @@ class Linker {
|
|||||||
$limitReached = false;
|
$limitReached = false;
|
||||||
$newLinks = false; // whether or not new links were added
|
$newLinks = false; // whether or not new links were added
|
||||||
$newText = $source->getText();
|
$newText = $source->getText();
|
||||||
$splitter = Splitter::default( $this->config );
|
$splitter = Splitter::singleton( $this->config );
|
||||||
$targets = Targets::default( $source->getTitle(), $this->config );
|
$targets = Targets::singleton( $source->getTitle(), $this->config );
|
||||||
|
|
||||||
// Iterate through the target page titles
|
// Iterate through the target page titles
|
||||||
foreach( $targets->queryResult as $row ) {
|
foreach( $targets->queryResult as $row ) {
|
||||||
|
@ -52,7 +52,7 @@ class Splitter {
|
|||||||
*
|
*
|
||||||
* @param Config|null $config LinkTitles configuration.
|
* @param Config|null $config LinkTitles configuration.
|
||||||
*/
|
*/
|
||||||
public static function default( Config &$config = null ) {
|
public static function singleton( Config &$config = null ) {
|
||||||
if ( self::$instance === null ) {
|
if ( self::$instance === null ) {
|
||||||
if ( $config === null ) {
|
if ( $config === null ) {
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
|
@ -40,7 +40,7 @@ class Targets {
|
|||||||
* @param String $sourceNamespace The namespace of the current page.
|
* @param String $sourceNamespace The namespace of the current page.
|
||||||
* @param Config $config LinkTitles configuration.
|
* @param Config $config LinkTitles configuration.
|
||||||
*/
|
*/
|
||||||
public static function default( \Title $title, Config $config ) {
|
public static function singleton( \Title $title, Config $config ) {
|
||||||
if ( ( self::$instance === null ) || ( self::$instance->sourceNamespace != $title->getNamespace() ) ) {
|
if ( ( self::$instance === null ) || ( self::$instance->sourceNamespace != $title->getNamespace() ) ) {
|
||||||
self::$instance = new Targets( $title, $config );
|
self::$instance = new Targets( $title, $config );
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ class Targets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidates the cache; the next call of Targets::default() will trigger
|
* Invalidates the cache; the next call of Targets::singleton() will trigger
|
||||||
* a database query.
|
* a database query.
|
||||||
*
|
*
|
||||||
* Use this in unit tests which are performed in a single request cycle so that
|
* Use this in unit tests which are performed in a single request cycle so that
|
||||||
|
@ -34,7 +34,7 @@ class SplitterTest extends MediaWikiTestCase {
|
|||||||
$config->skipTemplates = $skipTemplates;
|
$config->skipTemplates = $skipTemplates;
|
||||||
$config->parseHeadings = $parseHeadings;
|
$config->parseHeadings = $parseHeadings;
|
||||||
LinkTitles\Splitter::invalidate();
|
LinkTitles\Splitter::invalidate();
|
||||||
$splitter = LinkTitles\Splitter::default( $config );
|
$splitter = LinkTitles\Splitter::singleton( $config );
|
||||||
$this->assertSame( $skipTemplates, $splitter->config->skipTemplates, 'Splitter has incorrect skipTemplates config');
|
$this->assertSame( $skipTemplates, $splitter->config->skipTemplates, 'Splitter has incorrect skipTemplates config');
|
||||||
$this->assertSame( $parseHeadings, $splitter->config->parseHeadings, 'Splitter has incorrect parseHeadings config');
|
$this->assertSame( $parseHeadings, $splitter->config->parseHeadings, 'Splitter has incorrect parseHeadings config');
|
||||||
$this->assertSame( $expectedOutput, $splitter->split( $input ) );
|
$this->assertSame( $expectedOutput, $splitter->split( $input ) );
|
||||||
|
@ -34,7 +34,7 @@ class TargetsTest extends LinkTitles\TestCase {
|
|||||||
*/
|
*/
|
||||||
public function testTargets() {
|
public function testTargets() {
|
||||||
$title = \Title::newFromText( 'link target' );
|
$title = \Title::newFromText( 'link target' );
|
||||||
$targets = LinkTitles\Targets::default( $title, new LinkTitles\Config() );
|
$targets = LinkTitles\Targets::singleton( $title, new LinkTitles\Config() );
|
||||||
|
|
||||||
// Count number of articles: Inspired by updateArticleCount.php maintenance
|
// Count number of articles: Inspired by updateArticleCount.php maintenance
|
||||||
// script: https://doc.wikimedia.org/mediawiki-core/master/php/updateArticleCount_8php_source.html
|
// script: https://doc.wikimedia.org/mediawiki-core/master/php/updateArticleCount_8php_source.html
|
||||||
|
Reference in New Issue
Block a user