Revert "Move NewPP limit report HTML comments to JS variables" and followups
[lhc/web/wiklou.git] / includes / EditPage.php
index 0f27e78..ad308b1 100644 (file)
@@ -1044,7 +1044,6 @@ class EditPage {
 
                // Allow extensions to modify form data
                Hooks::run( 'EditPage::importFormData', [ $this, $request ] );
-
        }
 
        /**
@@ -2237,7 +2236,6 @@ class EditPage {
         * @return bool
         */
        private function mergeChangesIntoContent( &$editContent ) {
-
                $db = wfGetDB( DB_MASTER );
 
                // This is the revision the editor started from
@@ -2813,7 +2811,6 @@ class EditPage {
                if ( !$wgUser->getOption( 'previewontop' ) ) {
                        $this->displayPreviewArea( $previewOutput, false );
                }
-
        }
 
        /**
@@ -2839,7 +2836,6 @@ class EditPage {
                return Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
                        $templateListFormatter->format( $templates, $type )
                );
-
        }
 
        /**
@@ -3554,22 +3550,16 @@ HTML
                ] ) .
                        Html::openElement( 'tbody' );
 
-               foreach ( $output->getLimitReportData()['limitreport'] as $key => $value ) {
+               foreach ( $output->getLimitReportData() as $key => $value ) {
                        if ( Hooks::run( 'ParserLimitReportFormat',
                                [ $key, &$value, &$limitReport, true, true ]
                        ) ) {
-                               $keyMsg = wfMessage( "limitreport-$key" );
-                               $valueMsg = wfMessage(
-                                       [ "limitreport-$key-value-html", "limitreport-$key-value" ]
-                               );
+                               $keyMsg = wfMessage( $key );
+                               $valueMsg = wfMessage( [ "$key-value-html", "$key-value" ] );
                                if ( !$valueMsg->exists() ) {
                                        $valueMsg = new RawMessage( '$1' );
                                }
                                if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) {
-                                       // If it's a value/limit array, convert it for $1/$2
-                                       if ( is_array( $value ) && isset( $value['value'] ) ) {
-                                               $value = [ $value['value'], $value['limit'] ];
-                                       }
                                        $limitReport .= Html::openElement( 'tr' ) .
                                                Html::rawElement( 'th', null, $keyMsg->parse() ) .
                                                Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) .
@@ -4401,6 +4391,9 @@ HTML
                return strtr( $result, [ "&#x0" => "&#x" ] );
        }
 
+       /**
+        * @since 1.29
+        */
        protected function addEditNotices() {
                global $wgOut;
 
@@ -4419,6 +4412,9 @@ HTML
                }
        }
 
+       /**
+        * @since 1.29
+        */
        protected function addTalkPageText() {
                global $wgOut;