r83381 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83380‎ | r83381 | r83382 >
Date:11:29, 6 March 2011
Author:tbleher
Status:ok
Tags:
Comment:
Fix bug where Commentbox was only displayed on purged pages, not on normal page view

This is a workaround for the changed contents of $action since r78512. Before
that change, $action was set to 'view' on normal page views. Now $action is
empty if no action is given in the URL.
Modified paths:
  • /trunk/extensions/Commentbox/Commentbox.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Commentbox/Commentbox.php
@@ -48,7 +48,7 @@
4949 if ( !array_key_exists( $title->getNamespace(), $wgCommentboxNamespaces )
5050 || !$wgCommentboxNamespaces[ $title->getNamespace() ] )
5151 return true;
52 - if ( !( $action == 'view' || $action == 'purge' || $action == 'submit' ) )
 52+ if ( !( $action == 'view' || $action == 'purge' || $action == 'submit' || $action == '' ) )
5353 return true;
5454 if ( $wgRequest->getCheck( 'wpPreview' )
5555 || $wgRequest->getCheck( 'wpLivePreview' )

Follow-up revisions

RevisionCommit summaryAuthorDate
r83387Follow-up r83381: Use $wgRequest->getVal( 'action', 'view' ) instead of the g...ialex16:46, 6 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78512Per ^demon, follow-up r78260: introduced MediaWiki::getAction() to get the ac...ialex20:11, 16 December 2010

Status & tagging log