Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -57,16 +57,14 @@ |
58 | 58 | if ( !$titleObj || $titleObj->isExternal() ) { |
59 | 59 | $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); |
60 | 60 | } |
61 | | - |
| 61 | + |
62 | 62 | if( $params['redirect'] && $titleObj->isRedirect() ) { |
63 | | - |
64 | 63 | $pageSet = new ApiPageSet( $this->getQuery(), true ); // Or true, true to also do variant conversion of titles |
65 | 64 | $pageSet->populateFromTitles( array( $titleObj ) ); |
66 | 65 | foreach ( $pageSet->getRedirectTitles() as $from => $to ) { |
67 | | - $redirsValues[] = array( 'from' => $from, 'to' => $to ); |
| 66 | + $redirsValues[] = array( 'from' => $from, 'to' => $to ); |
68 | 67 | } |
69 | 68 | |
70 | | - |
71 | 69 | $this->getResult()->setIndexedTagName( $redirValues, 'r' ); |
72 | 70 | $this->getResult()->addValue( null, 'redirects', $redirValues ); |
73 | 71 | } |