dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5b43f4
)
follow-up to r70703: converted spaces to tabs and trimmed trailing spaces
author
Jack Phoenix
<ashley@users.mediawiki.org>
Sun, 8 Aug 2010 16:45:14 +0000
(16:45 +0000)
committer
Jack Phoenix
<ashley@users.mediawiki.org>
Sun, 8 Aug 2010 16:45:14 +0000
(16:45 +0000)
includes/api/ApiEditPage.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiEditPage.php
b/includes/api/ApiEditPage.php
index
6c4142a
..
c2812e4
100644
(file)
--- 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 ( !$titleObj || $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
}
-
+
if( $params['redirect'] && $titleObj->isRedirect() ) {
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 ) {
$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 );
}
$this->getResult()->setIndexedTagName( $redirValues, 'r' );
$this->getResult()->addValue( null, 'redirects', $redirValues );
}