Alex Monk has uploaded a new change for review.

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

Change subject: Tell the client whether we created a redirect or not properly.
......................................................................

Tell the client whether we created a redirect or not properly.

Instead of letting the API formatter set it to empty string if so
or not set it at all if not, have it set to "1" if so or "" if not,
so the JS will handle it correctly.

Bug: T136546
Change-Id: I7308ab1efc1c3060606b61893432b685038192a9
---
M ApiVisualEditorEdit.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 8d31581..e63ac80 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -190,7 +190,7 @@
                                $this->dieUsage( 'Error contacting the 
Parsoid/RESTBase server', 'docserver' );
                        }
 
-                       $result['isRedirect'] = $title->isRedirect();
+                       $result['isRedirect'] = (string) $title->isRedirect();
 
                        if ( class_exists( 'FlaggablePageView' ) ) {
                                $view = FlaggablePageView::singleton();

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

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

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

Reply via email to