[MediaWiki-commits] [Gerrit] Display 'cite_error_references_duplicate_key' next to the af... - change (mediawiki...Cite)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/247255 Change subject: Display 'cite_error_references_duplicate_key' next to the affected ref .. Display 'cite_error_references_duplicate_key' next to the affected ref Follow-up to 5d0fb0309bca864a6680c007eaf03645f590dc58. Bug: T114898 Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed (cherry picked from commit 6c59f478050b6e9ca5aae4a445a4e87c9c16d256) --- M Cite_body.php M citeParserTests.txt 2 files changed, 7 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/55/247255/1 diff --git a/Cite_body.php b/Cite_body.php index 71e08e6..cd42fb5 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -397,7 +397,7 @@ if ( $follow != null ) { if ( isset( $this->mRefs[$group][$follow] ) && is_array( $this->mRefs[$group][$follow] ) ) { // add text to the note that is being followed - $this->mRefs[$group][$follow]['text'] = $this->mRefs[$group][$follow]['text'] . ' ' . $str; + $this->mRefs[$group][$follow]['text'] .= ' ' . $str; } else { // insert part of note at the beginning of the group $groupsCount = count( $this->mRefs[$group] ); @@ -459,7 +459,8 @@ } else { if ( $str != null && $str !== '' && $str !== $this->mRefs[$group][$key]['text'] ) { // two refs with same key and different content - $this->mReferencesErrors[] = $this->error( 'cite_error_references_duplicate_key', $key ); + // add error message to the original ref + $this->mRefs[$group][$key]['text'] .= ' ' . $this->error( 'cite_error_references_duplicate_key', $key ); } $this->mRefCallStack[] = array( 'increment', $call, $str, $key, $group, $this->mRefs[$group][$key]['key'] ); diff --git a/citeParserTests.txt b/citeParserTests.txt index 6c6f7ef..ef23781 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -210,11 +210,10 @@ [1] -↑ 1.0 1.1 0 +↑ 1.0 1.1 0 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test @@ -230,11 +229,10 @@ [1] -↑ 1.0 1.1 1 +↑ 1.0 1.1 1 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/247255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: wmf/1.27.0-wmf.2 Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Display 'cite_error_references_duplicate_key' next to the af... - change (mediawiki...Cite)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/247256 Change subject: Display 'cite_error_references_duplicate_key' next to the affected ref .. Display 'cite_error_references_duplicate_key' next to the affected ref Follow-up to 5d0fb0309bca864a6680c007eaf03645f590dc58. Bug: T114898 Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed (cherry picked from commit 6c59f478050b6e9ca5aae4a445a4e87c9c16d256) --- M Cite_body.php M citeParserTests.txt 2 files changed, 7 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/56/247256/1 diff --git a/Cite_body.php b/Cite_body.php index 48b9930..75749c8 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -398,7 +398,7 @@ if ( $follow != null ) { if ( isset( $this->mRefs[$group][$follow] ) && is_array( $this->mRefs[$group][$follow] ) ) { // add text to the note that is being followed - $this->mRefs[$group][$follow]['text'] = $this->mRefs[$group][$follow]['text'] . ' ' . $str; + $this->mRefs[$group][$follow]['text'] .= ' ' . $str; } else { // insert part of note at the beginning of the group $groupsCount = count( $this->mRefs[$group] ); @@ -460,7 +460,8 @@ } else { if ( $str != null && $str !== '' && $str !== $this->mRefs[$group][$key]['text'] ) { // two refs with same key and different content - $this->mReferencesErrors[] = $this->error( 'cite_error_references_duplicate_key', $key ); + // add error message to the original ref + $this->mRefs[$group][$key]['text'] .= ' ' . $this->error( 'cite_error_references_duplicate_key', $key ); } $this->mRefCallStack[] = array( 'increment', $call, $str, $key, $group, $this->mRefs[$group][$key]['key'] ); diff --git a/citeParserTests.txt b/citeParserTests.txt index d4dc163..b160059 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -210,11 +210,10 @@ [1] -↑ 1.0 1.1 0 +↑ 1.0 1.1 0 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test @@ -230,11 +229,10 @@ [1] -↑ 1.0 1.1 1 +↑ 1.0 1.1 1 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/247256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: wmf/1.27.0-wmf.3 Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Display 'cite_error_references_duplicate_key' next to the af... - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Display 'cite_error_references_duplicate_key' next to the affected ref .. Display 'cite_error_references_duplicate_key' next to the affected ref Follow-up to 5d0fb0309bca864a6680c007eaf03645f590dc58. Bug: T114898 Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed (cherry picked from commit 6c59f478050b6e9ca5aae4a445a4e87c9c16d256) --- M Cite_body.php M citeParserTests.txt 2 files changed, 7 insertions(+), 8 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index 48b9930..75749c8 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -398,7 +398,7 @@ if ( $follow != null ) { if ( isset( $this->mRefs[$group][$follow] ) && is_array( $this->mRefs[$group][$follow] ) ) { // add text to the note that is being followed - $this->mRefs[$group][$follow]['text'] = $this->mRefs[$group][$follow]['text'] . ' ' . $str; + $this->mRefs[$group][$follow]['text'] .= ' ' . $str; } else { // insert part of note at the beginning of the group $groupsCount = count( $this->mRefs[$group] ); @@ -460,7 +460,8 @@ } else { if ( $str != null && $str !== '' && $str !== $this->mRefs[$group][$key]['text'] ) { // two refs with same key and different content - $this->mReferencesErrors[] = $this->error( 'cite_error_references_duplicate_key', $key ); + // add error message to the original ref + $this->mRefs[$group][$key]['text'] .= ' ' . $this->error( 'cite_error_references_duplicate_key', $key ); } $this->mRefCallStack[] = array( 'increment', $call, $str, $key, $group, $this->mRefs[$group][$key]['key'] ); diff --git a/citeParserTests.txt b/citeParserTests.txt index d4dc163..b160059 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -210,11 +210,10 @@ [1] -↑ 1.0 1.1 0 +↑ 1.0 1.1 0 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test @@ -230,11 +229,10 @@ [1] -↑ 1.0 1.1 1 +↑ 1.0 1.1 1 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/247256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: wmf/1.27.0-wmf.3 Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Anomie Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Display 'cite_error_references_duplicate_key' next to the af... - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Display 'cite_error_references_duplicate_key' next to the affected ref .. Display 'cite_error_references_duplicate_key' next to the affected ref Follow-up to 5d0fb0309bca864a6680c007eaf03645f590dc58. Bug: T114898 Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed (cherry picked from commit 6c59f478050b6e9ca5aae4a445a4e87c9c16d256) --- M Cite_body.php M citeParserTests.txt 2 files changed, 7 insertions(+), 8 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index 71e08e6..cd42fb5 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -397,7 +397,7 @@ if ( $follow != null ) { if ( isset( $this->mRefs[$group][$follow] ) && is_array( $this->mRefs[$group][$follow] ) ) { // add text to the note that is being followed - $this->mRefs[$group][$follow]['text'] = $this->mRefs[$group][$follow]['text'] . ' ' . $str; + $this->mRefs[$group][$follow]['text'] .= ' ' . $str; } else { // insert part of note at the beginning of the group $groupsCount = count( $this->mRefs[$group] ); @@ -459,7 +459,8 @@ } else { if ( $str != null && $str !== '' && $str !== $this->mRefs[$group][$key]['text'] ) { // two refs with same key and different content - $this->mReferencesErrors[] = $this->error( 'cite_error_references_duplicate_key', $key ); + // add error message to the original ref + $this->mRefs[$group][$key]['text'] .= ' ' . $this->error( 'cite_error_references_duplicate_key', $key ); } $this->mRefCallStack[] = array( 'increment', $call, $str, $key, $group, $this->mRefs[$group][$key]['key'] ); diff --git a/citeParserTests.txt b/citeParserTests.txt index 6c6f7ef..ef23781 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -210,11 +210,10 @@ [1] -↑ 1.0 1.1 0 +↑ 1.0 1.1 0 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test @@ -230,11 +229,10 @@ [1] -↑ 1.0 1.1 1 +↑ 1.0 1.1 1 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/247255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: wmf/1.27.0-wmf.2 Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Anomie Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Display 'cite_error_references_duplicate_key' next to the af... - change (mediawiki...Cite)
jenkins-bot has submitted this change and it was merged. Change subject: Display 'cite_error_references_duplicate_key' next to the affected ref .. Display 'cite_error_references_duplicate_key' next to the affected ref Follow-up to 5d0fb0309bca864a6680c007eaf03645f590dc58. Bug: T114898 Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed --- M Cite_body.php M citeParserTests.txt 2 files changed, 7 insertions(+), 8 deletions(-) Approvals: Alex Monk: Looks good to me, but someone else must approve Amire80: Looks good to me, approved Eranroz: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index 48b9930..75749c8 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -398,7 +398,7 @@ if ( $follow != null ) { if ( isset( $this->mRefs[$group][$follow] ) && is_array( $this->mRefs[$group][$follow] ) ) { // add text to the note that is being followed - $this->mRefs[$group][$follow]['text'] = $this->mRefs[$group][$follow]['text'] . ' ' . $str; + $this->mRefs[$group][$follow]['text'] .= ' ' . $str; } else { // insert part of note at the beginning of the group $groupsCount = count( $this->mRefs[$group] ); @@ -460,7 +460,8 @@ } else { if ( $str != null && $str !== '' && $str !== $this->mRefs[$group][$key]['text'] ) { // two refs with same key and different content - $this->mReferencesErrors[] = $this->error( 'cite_error_references_duplicate_key', $key ); + // add error message to the original ref + $this->mRefs[$group][$key]['text'] .= ' ' . $this->error( 'cite_error_references_duplicate_key', $key ); } $this->mRefCallStack[] = array( 'increment', $call, $str, $key, $group, $this->mRefs[$group][$key]['key'] ); diff --git a/citeParserTests.txt b/citeParserTests.txt index d4dc163..b160059 100644 --- a/citeParserTests.txt +++ b/citeParserTests.txt @@ -210,11 +210,10 @@ [1] -↑ 1.0 1.1 0 +↑ 1.0 1.1 0 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test @@ -230,11 +229,10 @@ [1] -↑ 1.0 1.1 1 +↑ 1.0 1.1 1 Cite error: Invalid ref tag; name "blank" defined multiple times with different content -Cite error: Invalid ref tag; name "blank" defined multiple times with different content - + !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/244194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id6d0b7f2c0b76b67a50fc981b9255dff99137bed Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Anomie Gerrit-Reviewer: Eranroz Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits