From ff2f868a92223b95a605f952ebc20c3170b5cbb8 Mon Sep 17 00:00:00 2001
From: WMDE-Fisch
Date: Tue, 25 Jul 2017 11:46:25 +0200
Subject: [PATCH] Use HTML::hidden to create input fields
Also add line break to comment added some patch before.
Change-Id: I9bd66b8444c069b4055fc5c3396256b688b78561
---
includes/EditPage.php | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 229a36a26e..e5fb4c5c10 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3220,16 +3220,13 @@ class EditPage {
protected function showFormBeforeText() {
global $wgOut;
- $section = htmlspecialchars( $this->section );
- $wgOut->addHTML( <<
-
-
-
-
-
-HTML
- );
+
+ $wgOut->addHTML( Html::hidden( 'wpSection', htmlspecialchars( $this->section ) ) );
+ $wgOut->addHTML( Html::hidden( 'wpStarttime', $this->starttime ) );
+ $wgOut->addHTML( Html::hidden( 'wpEdittime', $this->edittime ) );
+ $wgOut->addHTML( Html::hidden( 'editRevId', $this->editRevId ) );
+ $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop ) );
+
if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addHTML( Html::hidden( 'safemode', '1' ) );
}
@@ -3493,8 +3490,8 @@ HTML
}
/**
- * Inserts optional text shown below edit and upload forms. Can be used to offer special characters not present on
- * most keyboards for copying/pasting.
+ * Inserts optional text shown below edit and upload forms. Can be used to offer special
+ * characters not present on most keyboards for copying/pasting.
*/
protected function showEditTools() {
global $wgOut;
--
2.20.1