jenkins-bot has submitted this change and it was merged.
Change subject: Made Special:Contributions includable
......................................................................
Made Special:Contributions includable
This commit make Special:Contributions transcludable by changing
extended class SpecialPage to IncludableSpecialPage also it adds if
condition in execute function to avoid the inclusion of form when
Special:Contributions is transcluded into other appropriate MediaWiki pages.
Bug: 4365
Change-Id: I25c5cc3775b91fdc17c1209953d425c640e5bc77
---
M includes/specials/SpecialContributions.php
1 file changed, 13 insertions(+), 9 deletions(-)
Approvals:
Brian Wolff: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialContributions.php
b/includes/specials/SpecialContributions.php
index 6b56c2f..08768b6 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -27,7 +27,7 @@
* @ingroup SpecialPage
*/
-class SpecialContributions extends SpecialPage {
+class SpecialContributions extends IncludableSpecialPage {
protected $opts;
public function __construct() {
@@ -63,8 +63,9 @@
$this->opts['deletedOnly'] = $request->getBool( 'deletedOnly' );
if ( !strlen( $target ) ) {
- $out->addHTML( $this->getForm() );
-
+ if ( !$this->including() ) {
+ $out->addHTML( $this->getForm() );
+ }
return;
}
@@ -169,8 +170,9 @@
$this->addFeedLinks( array( 'action' => 'feedcontributions',
'user' => $target ) );
if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array(
$id, $userObj, $this ) ) ) {
- $out->addHTML( $this->getForm() );
-
+ if ( !$this->including() ) {
+ $out->addHTML( $this->getForm() );
+ }
$pager = new ContribsPager( $this->getContext(), array(
'target' => $target,
'contribs' => $this->opts['contribs'],
@@ -214,10 +216,12 @@
}
if ( $message ) {
- if ( !$this->msg( $message, $target
)->isDisabled() ) {
- $out->wrapWikiMsg(
- "<div
class='mw-contributions-footer'>\n$1\n</div>",
- array( $message, $target ) );
+ if ( !$this->including() ) {
+ if ( !$this->msg( $message, $target
)->isDisabled() ) {
+ $out->wrapWikiMsg(
+ "<div
class='mw-contributions-footer'>\n$1\n</div>",
+ array( $message,
$target ) );
+ }
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/106320
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I25c5cc3775b91fdc17c1209953d425c640e5bc77
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AalekhN <[email protected]>
Gerrit-Reviewer: Aklapper <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits