X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=beaca5f46f8e93e4eff6114675fb13a8de4796f1;hb=9994758337412d3c0263f66317e1e88393c17a0c;hp=f975a1f3275833028f8d4e8ddd1db0bf269f8b12;hpb=22f0f724bb806d8a218565063d61c9cb276db386;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index f975a1f327..beaca5f46f 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -22,7 +22,7 @@ class OutputPage extends ContextSource {
/// Should be private. Used with addMeta() which adds
var $mMetatags = array();
- /// most of the time the first 10 links to an article
+ /// most of the time the first 10 links to an article
var $mKeywords = array();
var $mLinktags = array();
@@ -813,7 +813,7 @@ class OutputPage extends ContextSource {
$this->mPagetitle = $nameWithTags;
# change "foo&bar" to "foo&bar"
- $this->setHTMLTitle( $this->msg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
+ $this->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) ) );
}
/**
@@ -1075,7 +1075,7 @@ class OutputPage extends ContextSource {
/**
* Add new language links
*
- * @param $newLinkArray Associative array mapping language code to the page
+ * @param $newLinkArray array Associative array mapping language code to the page
* name
*/
public function addLanguageLinks( $newLinkArray ) {
@@ -1085,7 +1085,7 @@ class OutputPage extends ContextSource {
/**
* Reset the language links and add new language links
*
- * @param $newLinkArray Associative array mapping language code to the page
+ * @param $newLinkArray array Associative array mapping language code to the page
* name
*/
public function setLanguageLinks( $newLinkArray ) {
@@ -1309,7 +1309,7 @@ class OutputPage extends ContextSource {
/**
* Get/set the ParserOptions object to use for wikitext parsing
*
- * @param $options either the ParserOption to use or null to only get the
+ * @param $options ParserOptions|null either the ParserOption to use or null to only get the
* current ParserOption object
* @return ParserOptions object
*/
@@ -1366,7 +1366,7 @@ class OutputPage extends ContextSource {
/**
* Set the displayed file version
*
- * @param $file File|false
+ * @param $file File|bool
* @return Mixed: previous value
*/
public function setFileVersion( $file ) {
@@ -1467,8 +1467,6 @@ class OutputPage extends ContextSource {
wfProfileIn( __METHOD__ );
- wfIncrStats( 'pcache_not_possible' );
-
$popts = $this->parserOptions();
$oldTidy = $popts->setTidy( $tidy );
$popts->setInterfaceMessage( (bool) $interface );
@@ -2250,6 +2248,7 @@ class OutputPage extends ContextSource {
$params = array(
'id' => 'wpTextbox1',
'name' => 'wpTextbox1',
+ 'cols' => $this->getUser()->getOption( 'cols' ),
'rows' => $this->getUser()->getOption( 'rows' ),
'readonly' => 'readonly',
'lang' => $pageLang->getHtmlCode(),
@@ -2345,7 +2344,7 @@ $templates
* Add a "return to" link pointing to a specified title,
* or the title indicated in the request, or else the main page
*
- * @param $unused No longer used
+ * @param $unused
* @param $returnto Title or String to return to
* @param $returntoquery String: query string for the return to link
*/
@@ -2381,6 +2380,7 @@ $templates
*/
public function headElement( Skin $sk, $includeStyle = true ) {
global $wgContLang;
+
$userdir = $this->getLanguage()->getDir();
$sitedir = $wgContLang->getDir();
@@ -2425,6 +2425,7 @@ $templates
}
$bodyAttrs['class'] .= ' ' . $sk->getPageClasses( $this->getTitle() );
$bodyAttrs['class'] .= ' skin-' . Sanitizer::escapeClass( $sk->getSkinName() );
+ $bodyAttrs['class'] .= ' action-' . Sanitizer::escapeClass( Action::getActionName( $this->getContext() ) );
$sk->addToBodyAttributes( $this, $bodyAttrs ); // Allow skins to add body attributes they need
wfRunHooks( 'OutputPageBodyAttributes', array( $this, $sk, &$bodyAttrs ) );
@@ -2438,12 +2439,12 @@ $templates
* Add the default ResourceLoader modules to this object
*/
private function addDefaultModules() {
- global $wgIncludeLegacyJavaScript, $wgUseAjax, $wgAjaxWatch, $wgEnableMWSuggest;
+ global $wgIncludeLegacyJavaScript, $wgPreloadJavaScriptMwUtil, $wgUseAjax,
+ $wgAjaxWatch, $wgEnableMWSuggest;
// Add base resources
$this->addModules( array(
'mediawiki.user',
- 'mediawiki.util',
'mediawiki.page.startup',
'mediawiki.page.ready',
) );
@@ -2451,6 +2452,12 @@ $templates
$this->addModules( 'mediawiki.legacy.wikibits' );
}
+ if ( $wgPreloadJavaScriptMwUtil ) {
+ $this->addModules( 'mediawiki.util' );
+ }
+
+ MWDebug::addModules( $this );
+
// Add various resources if required
if ( $wgUseAjax ) {
$this->addModules( 'mediawiki.legacy.ajax' );
@@ -2494,10 +2501,11 @@ $templates
* @param $only String ResourceLoaderModule TYPE_ class constant
* @param $useESI boolean
* @param $extraQuery Array with extra query parameters to add to each request. array( param => value )
+ * @param $loadCall boolean If true, output an (asynchronous) mw.loader.load() call rather than a