Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F584942
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
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 f4a84ce669a..d5df5987db1 100644
--- a/tests/phpunit/includes/recentchanges/ChangesListTest.php
+++ b/tests/phpunit/includes/recentchanges/ChangesListTest.php
@@ -84,7 +84,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()
@@ -102,9 +102,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
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (11 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227421
Default Alt Text
(2 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment