* written by the target user.
*
* @todo This would probably look a lot nicer in a table.
- * @param $row
+ * @param stdClass $row
* @return string
*/
function formatRow( $row ) {
/**
* Generates the subheading with links
- * @param $userObj User object for the target
- * @return String: appropriately-escaped HTML to be output literally
+ * @param User $userObj User object for the target
+ * @return string Appropriately-escaped HTML to be output literally
* @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined.
*/
function getSubTitle( $userObj ) {
$links = $this->getLanguage()->pipeList( $tools );
// Show a note if the user is blocked and display the last block log entry.
- if ( $userObj->isBlocked() ) {
+ $block = Block::newFromTarget( $userObj, $userObj );
+ if ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
+ if ( $block->getType() == Block::TYPE_RANGE ) {
+ $nt = MWNamespace::getCanonicalName( NS_USER ) . ':' . $block->getTarget();
+ }
+
// LogEventsList::showLogExtract() wants the first parameter by ref
$out = $this->getOutput();
LogEventsList::showLogExtract(
'showIfEmpty' => false,
'msgKey' => array(
'sp-contributions-blocked-notice',
- $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
+ $userObj->getName() # Support GENDER in 'sp-contributions-blocked-notice'
),
'offset' => '' # don't use $this->getRequest() parameter offset
)
/**
* Generates the namespace selector form with hidden attributes.
- * @param array $options the options to be included.
+ * @param array $options The options to be included.
* @return string
*/
function getForm( $options ) {