Yurik has uploaded a new change for review.

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

Change subject: Keep debug flag while editing a page
......................................................................

Keep debug flag while editing a page

If request contained 'debug' field, keep it around
for the subsequent edit requests as a hidden field.

Change-Id: I6d401ce66fe5b3e131c1673b9d665fb9899228c3
---
M includes/EditPage.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/161878/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index a9925ff..421ad86 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2284,7 +2284,8 @@
         *     during form output near the top, for captchas and the like.
         */
        function showEditForm( $formCallback = null ) {
-               global $wgOut, $wgUser;
+               global $wgOut, $wgUser, $wgRequest;
+;
 
                wfProfileIn( __METHOD__ );
 
@@ -2422,6 +2423,10 @@
                $wgOut->addHTML( Html::hidden( 'format', $this->contentFormat ) 
);
                $wgOut->addHTML( Html::hidden( 'model', $this->contentModel ) );
 
+               if ( $wgRequest->getCheck( 'debug' ) ) {
+                       $wgOut->addHTML( Html::hidden( 'debug', '1' ) );
+               }
+
                if ( $this->section == 'new' ) {
                        $this->showSummaryInput( true, $this->summary );
                        $wgOut->addHTML( $this->getSummaryPreview( true, 
$this->summary ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d401ce66fe5b3e131c1673b9d665fb9899228c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

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

Reply via email to