* The global function wfUseMW, deprecated since 1.26, has now been removed. Use
the "requires" property of static extension registration instead.
* $wgSpecialPages no longer accepts array syntax, deprecated since 1.18.
+* The MailAddress constructor can no longer be called with a User object,
+ behaviour which has been deprecated since 1.24.
=== Deprecations in 1.32 ===
* HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit
public $address;
/**
- * @param string $address String with an email address, or a User object
+ * @param string $address String with an email address
* @param string|null $name Human-readable name if a string address is given
* @param string|null $realName Human-readable real name if a string address is given
*/
function __construct( $address, $name = null, $realName = null ) {
- if ( is_object( $address ) && $address instanceof User ) {
- // Old calling format, now deprecated
- wfDeprecated( __METHOD__ . ' with a User object', '1.24' );
- $this->address = $address->getEmail();
- $this->name = $address->getName();
- $this->realName = $address->getRealName();
- } else {
- $this->address = strval( $address );
- $this->name = strval( $name );
- $this->realName = strval( $realName );
- }
+ $this->address = strval( $address );
+ $this->name = strval( $name );
+ $this->realName = strval( $realName );
}
/**
if ( $page instanceof SpecialPage ) {
return $page;
- } else {
- // It's not a classname, nor a callback, nor a legacy constructor array,
- // nor a special page object. Give up.
- wfLogWarning( "Cannot instantiate special page $realName: bad spec!" );
- return null;
}
- } else {
- return null;
+ // It's not a classname, nor a callback, nor a legacy constructor array,
+ // nor a special page object. Give up.
+ wfLogWarning( "Cannot instantiate special page $realName: bad spec!" );
}
+
+ return null;
}
/**
$context->getOutput()->redirect( $url );
return $title;
- } else {
- $context->setTitle( $page->getPageTitle( $par ) );
}
+
+ $context->setTitle( $page->getPageTitle( $par ) );
} elseif ( !$page->isIncludable() ) {
return false;
}
list( $name, $subpage ) = $this->resolveAlias( $alias );
if ( $name != null ) {
return SpecialPage::getTitleFor( $name, $subpage );
- } else {
- return null;
}
+
+ return null;
}
}