Merge "Surround edit notices with appropriate classes"
[lhc/web/wiklou.git] / includes / OutputPage.php
index 411bb2e..4e14b7b 100644 (file)
@@ -247,8 +247,9 @@ class OutputPage extends ContextSource {
        protected $mSquidMaxage = 0;
 
        /**
-        * @var bool
-        * @todo Document
+        * @var bool Controls if anti-clickjacking / frame-breaking headers will
+        * be sent. This should be done for pages where edit actions are possible.
+        * Setters: $this->preventClickjacking() and $this->allowClickjacking().
         */
        protected $mPreventClickjacking = true;
 
@@ -1626,6 +1627,7 @@ class OutputPage extends ContextSource {
         * @param string $text
         * @param bool $linestart Is this the start of a line?
         * @param bool $interface Is this text in the user interface language?
+        * @throws MWException
         */
        public function addWikiText( $text, $linestart = true, $interface = true ) {
                $title = $this->getTitle(); // Work around E_STRICT
@@ -1683,8 +1685,6 @@ class OutputPage extends ContextSource {
        ) {
                global $wgParser;
 
-               wfProfileIn( __METHOD__ );
-
                $popts = $this->parserOptions();
                $oldTidy = $popts->setTidy( $tidy );
                $popts->setInterfaceMessage( (bool)$interface );
@@ -1698,7 +1698,6 @@ class OutputPage extends ContextSource {
 
                $this->addParserOutput( $parserOutput );
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2171,8 +2170,6 @@ class OutputPage extends ContextSource {
                        return;
                }
 
-               wfProfileIn( __METHOD__ );
-
                $response = $this->getRequest()->response();
                $config = $this->getConfig();
 
@@ -2207,7 +2204,6 @@ class OutputPage extends ContextSource {
                                }
                        }
 
-                       wfProfileOut( __METHOD__ );
                        return;
                } elseif ( $this->mStatusCode ) {
                        $message = HttpStatus::getMessage( $this->mStatusCode );
@@ -2262,9 +2258,7 @@ class OutputPage extends ContextSource {
                        // adding of CSS or Javascript by extensions.
                        Hooks::run( 'BeforePageDisplay', array( &$this, &$sk ) );
 
-                       wfProfileIn( 'Output-skin' );
                        $sk->outputPage();
-                       wfProfileOut( 'Output-skin' );
                }
 
                // This hook allows last minute changes to final overall output by modifying output buffer
@@ -2274,7 +2268,6 @@ class OutputPage extends ContextSource {
 
                ob_end_flush();
 
-               wfProfileOut( __METHOD__ );
        }
 
        /**
@@ -2624,8 +2617,6 @@ class OutputPage extends ContextSource {
        public function headElement( Skin $sk, $includeStyle = true ) {
                global $wgContLang;
 
-               $section = new ProfileSection( __METHOD__ );
-
                $userdir = $this->getLanguage()->getDir();
                $sitedir = $wgContLang->getDir();
 
@@ -2727,7 +2718,7 @@ class OutputPage extends ContextSource {
         *   call rather than a "<script src='...'>" tag.
         * @return string The html "<script>", "<link>" and "<style>" tags
         */
-       protected function makeResourceLoaderLink( $modules, $only, $useESI = false,
+       public function makeResourceLoaderLink( $modules, $only, $useESI = false,
                array $extraQuery = array(), $loadCall = false
        ) {
                $modules = (array)$modules;
@@ -3136,7 +3127,7 @@ class OutputPage extends ContextSource {
         * have to be purged on configuration changes.
         * @return array
         */
-       private function getJSVars() {
+       public function getJSVars() {
                global $wgContLang;
 
                $curRevisionId = 0;