Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -58,6 +58,8 @@ |
59 | 59 | $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); |
60 | 60 | } |
61 | 61 | |
| 62 | + $result = $this->getResult(); |
| 63 | + |
62 | 64 | if ( $params['redirect'] ) { |
63 | 65 | if ( $titleObj->isRedirect() ) { |
64 | 66 | $oldTitle = $titleObj; |
— | — | @@ -65,7 +67,7 @@ |
66 | 68 | $titles = Title::newFromRedirectArray( Revision::newFromTitle( $oldTitle )->getText( Revision::FOR_THIS_USER ) ); |
67 | 69 | // array_shift( $titles ); |
68 | 70 | |
69 | | - $this->getResult()->addValue( null, 'foo', $titles ); |
| 71 | + $result->addValue( null, 'foo', $titles ); |
70 | 72 | |
71 | 73 | $redirValues = array(); |
72 | 74 | foreach ( $titles as $id => $newTitle ) { |
— | — | @@ -82,9 +84,8 @@ |
83 | 85 | $titleObj = $newTitle; |
84 | 86 | } |
85 | 87 | |
86 | | - $this->getResult()->setIndexedTagName( $redirValues, 'r' ); |
87 | | - $this->getResult()->addValue( null, 'redirects', $redirValues ); |
88 | | - |
| 88 | + $result->setIndexedTagName( $redirValues, 'r' ); |
| 89 | + $result->addValue( null, 'redirects', $redirValues ); |
89 | 90 | } |
90 | 91 | } |
91 | 92 | |
— | — | @@ -256,7 +257,7 @@ |
257 | 258 | if ( !wfRunHooks( 'APIEditBeforeSave', array( $ep, $ep->textbox1, &$r ) ) ) { |
258 | 259 | if ( count( $r ) ) { |
259 | 260 | $r['result'] = 'Failure'; |
260 | | - $this->getResult()->addValue( null, $this->getModuleName(), $r ); |
| 261 | + $result->addValue( null, $this->getModuleName(), $r ); |
261 | 262 | return; |
262 | 263 | } else { |
263 | 264 | $this->dieUsageMsg( 'hookaborted' ); |
— | — | @@ -364,7 +365,7 @@ |
365 | 366 | default: |
366 | 367 | $this->dieUsageMsg( array( 'unknownerror', $retval ) ); |
367 | 368 | } |
368 | | - $this->getResult()->addValue( null, $this->getModuleName(), $r ); |
| 369 | + $result->addValue( null, $this->getModuleName(), $r ); |
369 | 370 | } |
370 | 371 | |
371 | 372 | public function mustBePosted() { |