Foxtrott has submitted this change and it was merged.
Change subject: Fix minor issues
......................................................................
Fix minor issues
Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
---
M src/LingoBasicBackend.php
M src/LingoParser.php
2 files changed, 2 insertions(+), 14 deletions(-)
Approvals:
Foxtrott: Verified; Looks good to me, approved
diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 04395ef..69a9874 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -60,7 +60,7 @@
$title = Title::newFromText( $page );
if ( $title->getInterwiki() ) {
$this->getMessageLog()->addError( wfMessage(
'lingo-terminologypagenotlocal', $page )->inContentLanguage()->text() );
- return false;
+ return;
}
// FIXME: This is a hack special-casing the submitting of the
terminology
diff --git a/src/LingoParser.php b/src/LingoParser.php
index 2e85dc9..1d4942f 100644
--- a/src/LingoParser.php
+++ b/src/LingoParser.php
@@ -64,18 +64,6 @@
}
/**
- * @param Parser $parser
- * @return string
- */
- private static function uniqPrefix( Parser &$parser ) {
- if ( defined( "Parser::MARKER_PREFIX" ) ) {
- return Parser::MARKER_PREFIX;
- } else {
- return $parser->uniqPrefix();
- }
- }
-
- /**
*
* @param Parser $parser
* @param string $text
@@ -88,7 +76,7 @@
// The RegEx to split a chunk of text into words
// Words are: placeholders for stripped items,
sequences of letters and numbers, single characters that are neither letter nor
number
- self::$regex = '/' . preg_quote( self::uniqPrefix(
$parser ), '/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) .
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
+ self::$regex = '/' . preg_quote( Parser::MARKER_PREFIX,
'/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) .
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
}
self::$parserSingleton->realParse( $parser, $text );
--
To view, visit https://gerrit.wikimedia.org/r/275265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>
Gerrit-Reviewer: Foxtrott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits