Follows-up
f739a8f368a, and
22c9aa5ec07.
The execute() method here should generally be void, with the
exception of includable special pages, where the return value
is a string of HTML.
This was likely left-over early iteration of commit
f739a8f368a,
which ended up returning from getRedirect() instead.
Change-Id: I68715910114e19a0421625e814fd8881068f6406
* ObjectFactory class, deprecated in 1.31, has been removed.
* HWLDFWordAccumudlator class, deprecated in 1.28, has been removed.
* XMPInfo, XMPReader and XMPValidate, deprecated in 1.32, have been removed.
* ObjectFactory class, deprecated in 1.31, has been removed.
* HWLDFWordAccumudlator class, deprecated in 1.28, has been removed.
* XMPInfo, XMPReader and XMPValidate, deprecated in 1.32, have been removed.
+* The RedirectSpecialPage::execute method could sometimes return a Title object.
+ This behavior was removed, and the method now matches the parent signature
+ (SpecialPage::execute) which is to return HTML string or void.
+ To obtain the destination title, use RedirectSpecialPage::getRedirect.
=== Deprecations in 1.34 ===
* The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
=== Deprecations in 1.34 ===
* The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
/**
* @param string|null $subpage
/**
* @param string|null $subpage
*/
public function execute( $subpage ) {
$redirect = $this->getRedirect( $subpage );
$query = $this->getRedirectQuery();
*/
public function execute( $subpage ) {
$redirect = $this->getRedirect( $subpage );
$query = $this->getRedirectQuery();
- // Redirect to a page title with possible query parameters
if ( $redirect instanceof Title ) {
if ( $redirect instanceof Title ) {
+ // Redirect to a page title with possible query parameters
$url = $redirect->getFullUrlForRedirect( $query );
$this->getOutput()->redirect( $url );
$url = $redirect->getFullUrlForRedirect( $query );
$this->getOutput()->redirect( $url );
} elseif ( $redirect === true ) {
// Redirect to index.php with query parameters
$url = wfAppendQuery( wfScript( 'index' ), $query );
$this->getOutput()->redirect( $url );
} elseif ( $redirect === true ) {
// Redirect to index.php with query parameters
$url = wfAppendQuery( wfScript( 'index' ), $query );
$this->getOutput()->redirect( $url );
} else {
$this->showNoRedirectPage();
}
} else {
$this->showNoRedirectPage();
}