Merge "Add wgRevisionId variable to ResourceLoader"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Sep 2013 02:43:26 +0000 (02:43 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Sep 2013 02:43:26 +0000 (02:43 +0000)
1  2 
includes/OutputPage.php

diff --combined includes/OutputPage.php
@@@ -1534,7 -1534,7 +1534,7 @@@ class OutputPage extends ContextSource 
  
                $popts = $this->parserOptions();
                $oldTidy = $popts->setTidy( $tidy );
 -              $popts->setInterfaceMessage( (bool) $interface );
 +              $popts->setInterfaceMessage( (bool)$interface );
  
                $parserOutput = $wgParser->parse(
                        $text, $title, $popts,
                                array(
                                        "{$wgCookiePrefix}Token",
                                        "{$wgCookiePrefix}LoggedOut",
 +                                      "forceHTTPS",
                                        session_name()
                                ),
                                $wgCacheVaryCookies
@@@ -2433,6 -2432,14 +2433,6 @@@ $template
         * @param $options Options array to pass to Linker
         */
        public function addReturnTo( $title, $query = array(), $text = null, $options = array() ) {
 -              if ( in_array( 'http', $options ) ) {
 -                      $proto = PROTO_HTTP;
 -              } elseif ( in_array( 'https', $options ) ) {
 -                      $proto = PROTO_HTTPS;
 -              } else {
 -                      $proto = PROTO_RELATIVE;
 -              }
 -
                $link = $this->msg( 'returnto' )->rawParams(
                        Linker::link( $title, $text, array(), $query, $options ) )->escaped();
                $this->addHTML( "<p id=\"mw-returnto\">{$link}</p>\n" );
                $userdir = $this->getLanguage()->getDir();
                $sitedir = $wgContLang->getDir();
  
 -              if ( $sk->commonPrintStylesheet() ) {
 -                      $this->addModuleStyles( 'mediawiki.legacy.wikiprintable' );
 -              }
 -
                $ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
  
                if ( $this->getHTMLTitle() == '' ) {
        protected function makeResourceLoaderLink( $modules, $only, $useESI = false, array $extraQuery = array(), $loadCall = false ) {
                global $wgResourceLoaderUseESI;
  
 -              $modules = (array) $modules;
 +              $modules = (array)$modules;
  
                if ( !count( $modules ) ) {
                        return '';
                        'wgPageName' => $title->getPrefixedDBkey(),
                        'wgTitle' => $title->getText(),
                        'wgCurRevisionId' => $latestRevID,
+                       'wgRevisionId' => (int)$this->getRevisionId(),
                        'wgArticleId' => $pageID,
                        'wgIsArticle' => $this->isArticle(),
                        'wgIsRedirect' => $title->isRedirect(),