EditPage: Preserve &ooui=1 / &ooui=0 from URL after preview
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 15 May 2017 18:33:37 +0000 (20:33 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 15 May 2017 18:33:37 +0000 (20:33 +0200)
Bug: T165237
Change-Id: Ia546159b45fabb1256f63f888412703ca3eba2e9

includes/EditPage.php

index b1f50f0..098ffbf 100644 (file)
@@ -2753,6 +2753,9 @@ class EditPage {
                $wgOut->addHTML( Html::hidden( 'format', $this->contentFormat ) );
                $wgOut->addHTML( Html::hidden( 'model', $this->contentModel ) );
 
+               // Preserve &ooui=1 / &ooui=0 from URL parameters after submitting the page for preview
+               $wgOut->addHTML( Html::hidden( 'ooui', $this->oouiEnabled ? '1' : '0' ) );
+
                // following functions will need OOUI, enable it only once; here.
                if ( $this->oouiEnabled ) {
                        $wgOut->enableOOUI();