From 366a66ecf9e51d2d9a477093b6723ca7adc9917c Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Sun, 8 Aug 2010 16:45:14 +0000 Subject: [PATCH] follow-up to r70703: converted spaces to tabs and trimmed trailing spaces --- includes/api/ApiEditPage.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 6c4142aca1..c2812e440a 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -57,16 +57,14 @@ class ApiEditPage extends ApiBase { if ( !$titleObj || $titleObj->isExternal() ) { $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); } - + if( $params['redirect'] && $titleObj->isRedirect() ) { - $pageSet = new ApiPageSet( $this->getQuery(), true ); // Or true, true to also do variant conversion of titles $pageSet->populateFromTitles( array( $titleObj ) ); foreach ( $pageSet->getRedirectTitles() as $from => $to ) { - $redirsValues[] = array( 'from' => $from, 'to' => $to ); + $redirsValues[] = array( 'from' => $from, 'to' => $to ); } - $this->getResult()->setIndexedTagName( $redirValues, 'r' ); $this->getResult()->addValue( null, 'redirects', $redirValues ); } -- 2.20.1