Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/286924

Change subject: fixup
......................................................................

fixup

Change-Id: I2462af1ef4b6d5906d4bc809d24240adccce4493
---
M ApiVisualEditorEdit.php
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/24/286924/1

diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 725697d..8d31581 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -122,8 +122,8 @@
        public function execute() {
                $user = $this->getUser();
                $params = $this->extractRequestParams();
-               $page = Title::newFromText( $params['page'] );
-               if ( !$page ) {
+               $title = Title::newFromText( $params['page'] );
+               if ( !$title ) {
                        $this->dieUsageMsg( 'invalidtitle', $params['page'] );
                }
 
@@ -145,13 +145,13 @@
                                $this->dieUsage( 'No cached serialization found 
with that key', 'badcachekey' );
                        }
                } else {
-                       $wikitext = $this->postHTML( $page, $html, 
$parserParams, $params['etag'] );
+                       $wikitext = $this->postHTML( $title, $html, 
$parserParams, $params['etag'] );
                        if ( $wikitext === false ) {
                                $this->dieUsage( 'Error contacting the 
Parsoid/RESTbase server', 'docserver' );
                        }
                }
 
-               $saveresult = $this->saveWikitext( $page, $wikitext, $params );
+               $saveresult = $this->saveWikitext( $title, $wikitext, $params );
                $editStatus = $saveresult['edit']['result'];
 
                // Error
@@ -180,17 +180,17 @@
                                        } );
                                }
                        } else {
-                               $newRevId = $page->getLatestRevId();
+                               $newRevId = $title->getLatestRevId();
                        }
 
                        // Return result of parseWikitext instead of 
saveWikitext so that the
                        // frontend can update the page rendering without a 
refresh.
-                       $result = $this->parseWikitext( $page, $newRevId );
+                       $result = $this->parseWikitext( $title, $newRevId );
                        if ( $result === false ) {
                                $this->dieUsage( 'Error contacting the 
Parsoid/RESTBase server', 'docserver' );
                        }
 
-                       $result['isRedirect'] = $page->isRedirect();
+                       $result['isRedirect'] = $title->isRedirect();
 
                        if ( class_exists( 'FlaggablePageView' ) ) {
                                $view = FlaggablePageView::singleton();
@@ -203,12 +203,12 @@
                                        [
                                                'diff' => null,
                                                'oldid' => '',
-                                               'title' => 
$page->getPrefixedText(),
+                                               'title' => 
$title->getPrefixedText(),
                                                'action' => 'view'
                                        ] + $this->getRequest()->getValues()
                                );
                                $view->getContext()->setRequest( $newRequest );
-                               RequestContext::getMain()->setTitle( $page );
+                               RequestContext::getMain()->setTitle( $title );
 
                                // The two parameters here are references but 
we don't care
                                // about what FlaggedRevs does with them.

-- 
To view, visit https://gerrit.wikimedia.org/r/286924
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2462af1ef4b6d5906d4bc809d24240adccce4493
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to