Page MenuHomePhorge

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/includes/recentchanges/ChangesList.php b/includes/recentchanges/ChangesList.php
index 02a0c309108..abe1c8be448 100644
--- a/includes/recentchanges/ChangesList.php
+++ b/includes/recentchanges/ChangesList.php
@@ -599,19 +599,15 @@ class ChangesList extends ContextSource {
$query
);
}
- if ( $rc->mAttribs['rc_type'] == RC_CATEGORIZE ) {
- $histLink = $this->message['hist'];
- } else {
- $histLink = $this->linkRenderer->makeKnownLink(
- $rc->getTitle(),
- new HtmlArmor( $this->message['hist'] ),
- [ 'class' => 'mw-changeslist-history' ],
- [
- 'curid' => $rc->mAttribs['rc_cur_id'],
- 'action' => 'history'
- ]
- );
- }
+ $histLink = $this->linkRenderer->makeKnownLink(
+ $rc->getTitle(),
+ new HtmlArmor( $this->message['hist'] ),
+ [ 'class' => 'mw-changeslist-history' ],
+ [
+ 'curid' => $rc->mAttribs['rc_cur_id'],
+ 'action' => 'history'
+ ]
+ );
$s .= Html::rawElement( 'span', [ 'class' => 'mw-changeslist-links' ],
Html::rawElement( 'span', [], $diffLink ) .
diff --git a/tests/phpunit/includes/recentchanges/ChangesListTest.php b/tests/phpunit/includes/recentchanges/ChangesListTest.php
index 3eb17d42f91..23c7bdfc412 100644
--- a/tests/phpunit/includes/recentchanges/ChangesListTest.php
+++ b/tests/phpunit/includes/recentchanges/ChangesListTest.php
@@ -86,7 +86,7 @@ class ChangesListTest extends MediaWikiIntegrationTestCase {
$this->assertStringEndsWith( 'hook-added', $lineInnerHtml, 'Hook did not successfully modify HTML' );
}
- public function testInsertDiffLinkWhenRecentChangeIsCategoryType() {
+ public function testInsertDiffAndHistLinkWhenRecentChangeIsCategoryType() {
$changesList = $this->getChangesList();
$recentChange = $this->getCategoryChange(
$changesList->getContext()->getUser()
@@ -104,9 +104,13 @@ class ChangesListTest extends MediaWikiIntegrationTestCase {
// Get the diff/hist HTML line and check that the diff a href is present.
$changesList->insertDiffHist( $html, $recentChange );
$htmlElement = DOMUtils::parseHTML( $html );
- $wrappingElement = DOMCompat::querySelector(
+ $wrappingDiffElement = DOMCompat::querySelector(
$htmlElement, 'a.mw-changeslist-diff'
);
- $this->assertNotNull( $wrappingElement );
+ $wrappingHistElement = DOMCompat::querySelector(
+ $htmlElement, 'a.mw-changeslist-history'
+ );
+ $this->assertNotNull( $wrappingDiffElement );
+ $this->assertNotNull( $wrappingHistElement );
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (11 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227422
Default Alt Text
(2 KB)

Event Timeline