jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/363509 )
Change subject: ChangesListSpecialPage: Don't short-circuit the ChangesList,
instead format zero rows
......................................................................
ChangesListSpecialPage: Don't short-circuit the ChangesList, instead format
zero rows
Short-circuiting the ChangesList causes bugs, because it causes
ChangesList::beginRecentChangesList() to be bypassed. This function
adds important styles and RL modules, especially when enhanced RC is enabled.
Instead, fake an empty result and let the ChangesList format it.
This will add styles and modules but otherwise produce no output.
(It does produce an empty div, but the idiosyncratic way in which the
subclasses deal with empty results causes that div not to be output.)
Bug: T169835
Change-Id: Ib831c781f4fe91eef787aef3d17e71780be9da51
---
M includes/specialpage/ChangesListSpecialPage.php
1 file changed, 2 insertions(+), 7 deletions(-)
Approvals:
Sbisson: Looks good to me, approved
jenkins-bot: Verified
Jforrester: Looks good to me, but someone else must approve
diff --git a/includes/specialpage/ChangesListSpecialPage.php
b/includes/specialpage/ChangesListSpecialPage.php
index 0be0646..eb431a4 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -22,6 +22,7 @@
*/
use MediaWiki\Logger\LoggerFactory;
use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\FakeResultWrapper;
use Wikimedia\Rdbms\IDatabase;
/**
@@ -518,13 +519,7 @@
$rows = $this->getRows();
$opts = $this->getOptions();
if ( $rows === false ) {
- if ( !$this->including() ) {
- $this->doHeader( $opts, 0 );
- $this->outputNoResults();
- $this->getOutput()->setStatusCode( 404 );
- }
-
- return;
+ $rows = new FakeResultWrapper( [] );
}
$batch = new LinkBatch;
--
To view, visit https://gerrit.wikimedia.org/r/363509
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib831c781f4fe91eef787aef3d17e71780be9da51
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits