diff --git a/.gitignore b/.gitignore index 0fc8781..edca624 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ doxygen_sqlite3.db /LinkTitles.phpproj.user /LinkTitles.sln /LinkTitles.v12.suo +release/ diff --git a/NEWS b/NEWS index 05aa26c..9a29dfd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +Version 5.0.4 (2017-09-23) +------------------------------------------------------------------------ + +- Fix: Many pages would not be linked. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + Version 5.0.3 (2017-09-06) ------------------------------------------------------------------------ diff --git a/extension.json b/extension.json index 7370ccc..bdfe5d8 100644 --- a/extension.json +++ b/extension.json @@ -9,7 +9,7 @@ ], "type": "parserhook", "url": "https://www.mediawiki.org/wiki/Extension:LinkTitles", - "version": "5.0.3", + "version": "5.0.4", "license-name": "GPL-2.0+", "descriptionmsg": "linktitles-desc", "requires": { diff --git a/gh-pages b/gh-pages index ca9037c..570fcaa 160000 --- a/gh-pages +++ b/gh-pages @@ -1 +1 @@ -Subproject commit ca9037ca4edbf7cb4ba6a07201da5b22c86ceb6e +Subproject commit 570fcaa3c59f534884a227fbfd34c328410f91a4 diff --git a/includes/Linker.php b/includes/Linker.php index 04871dc..62b07af 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -113,7 +113,8 @@ class Linker { for ( $i = 0; $i < count( $arr ); $i += 2 ) { $arr[$i] = preg_replace_callback( $target->getCaseSensitiveRegex(), array( $this, 'simpleModeCallback'), - $arr[$i], $limit, $count ); + $arr[$i], $limit, $replacements ); + $count += $replacements; if ( $this->config->firstOnly && ( $count > 0 ) ) { $limitReached = true; break; @@ -137,7 +138,8 @@ class Linker { // even indexes will point to text that is not enclosed by brackets $arr[$i] = preg_replace_callback( $target->getCaseInsensitiveRegex(), array( $this, 'smartModeCallback'), - $arr[$i], $limit, $count ); + $arr[$i], $limit, $replacements ); + $count += $replacements; if ( $this->config->firstOnly && ( $count > 0 )) { break; };