Add missing PHPDoc block to DifferenceEngine::getParserOutput
[lhc/web/wiklou.git] / includes / diff / DifferenceEngine.php
index 51b9f15..e76bffc 100644 (file)
@@ -634,7 +634,10 @@ class DifferenceEngine extends ContextSource {
                                        if ( Hooks::run( 'DifferenceEngineRenderRevisionAddParserOutput',
                                                [ $this, $out, $parserOutput, $wikiPage ] )
                                        ) {
-                                               $out->addParserOutput( $parserOutput );
+                                               $out->addParserOutput( $parserOutput, [
+                                                       'enableSectionEditLinks' => $this->mNewRev->isCurrent()
+                                                               && $this->mNewRev->getTitle()->quickUserCan( 'edit', $this->getUser() ),
+                                               ] );
                                        }
                                }
                        }
@@ -647,6 +650,12 @@ class DifferenceEngine extends ContextSource {
                }
        }
 
+       /**
+        * @param WikiPage $page
+        * @param Revision $rev
+        *
+        * @return ParserOutput|bool False if the revision was not found
+        */
        protected function getParserOutput( WikiPage $page, Revision $rev ) {
                $parserOptions = $page->makeParserOptions( $this->getContext() );