dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace Linker::link() with LinkRenderer in some special pages
[lhc/web/wiklou.git]
/
includes
/
EditPage.php
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
ca14864
..
745f8de
100644
(file)
--- a/
includes/EditPage.php
+++ b/
includes/EditPage.php
@@
-2326,9
+2326,12
@@
class EditPage {
}
function setHeaders() {
}
function setHeaders() {
- global $wgOut, $wgUser, $wgAjaxEditStash;
+ global $wgOut, $wgUser, $wgAjaxEditStash
, $wgCookieSetOnAutoblock
;
$wgOut->addModules( 'mediawiki.action.edit' );
$wgOut->addModules( 'mediawiki.action.edit' );
+ if ( $wgCookieSetOnAutoblock === true ) {
+ $wgOut->addModules( 'mediawiki.user.blockcookie' );
+ }
$wgOut->addModuleStyles( 'mediawiki.action.edit.styles' );
if ( $wgUser->getOption( 'showtoolbar' ) ) {
$wgOut->addModuleStyles( 'mediawiki.action.edit.styles' );
if ( $wgUser->getOption( 'showtoolbar' ) ) {
@@
-3407,6
+3410,7
@@
HTML
*
* @param Title $title
* @param string $format Output format, valid values are any function of a Message object
*
* @param Title $title
* @param string $format Output format, valid values are any function of a Message object
+ * @param Language|string|null $langcode Language code or Language object.
* @return string
*/
public static function getCopyrightWarning( $title, $format = 'plain', $langcode = null ) {
* @return string
*/
public static function getCopyrightWarning( $title, $format = 'plain', $langcode = null ) {
@@
-3534,7
+3538,7
@@
HTML
global $wgOut;
if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$this, &$wgOut ] ) ) {
global $wgOut;
if ( Hooks::run( 'EditPageBeforeConflictDiff', [ &$this, &$wgOut ] ) ) {
- $stats =
$wgOut->getContext()->getStats
();
+ $stats =
MediaWikiServices::getInstance()->getStatsdDataFactory
();
$stats->increment( 'edit.failures.conflict' );
// Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics
if (
$stats->increment( 'edit.failures.conflict' );
// Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics
if (
@@
-3673,7
+3677,7
@@
HTML
global $wgOut, $wgRawHtml, $wgLang;
global $wgAllowUserCss, $wgAllowUserJs;
global $wgOut, $wgRawHtml, $wgLang;
global $wgAllowUserCss, $wgAllowUserJs;
- $stats =
$wgOut->getContext()->getStats
();
+ $stats =
MediaWikiServices::getInstance()->getStatsdDataFactory
();
if ( $wgRawHtml && !$this->mTokenOk ) {
// Could be an offsite preview attempt. This is very unsafe if
if ( $wgRawHtml && !$this->mTokenOk ) {
// Could be an offsite preview attempt. This is very unsafe if
@@
-4067,7
+4071,7
@@
HTML
/**
* Returns an array of html code of the following buttons:
/**
* Returns an array of html code of the following buttons:
- * save, diff
, preview and live
+ * save, diff
and preview
*
* @param int $tabindex Current tabindex
*
*
* @param int $tabindex Current tabindex
*
@@
-4101,7
+4105,6
@@
HTML
] + Linker::tooltipAndAccesskeyAttribs( 'preview' );
$buttons['preview'] = Html::submitButton( $this->context->msg( 'showpreview' )->text(),
$attribs );
] + Linker::tooltipAndAccesskeyAttribs( 'preview' );
$buttons['preview'] = Html::submitButton( $this->context->msg( 'showpreview' )->text(),
$attribs );
- $buttons['live'] = '';
$attribs = [
'id' => 'wpDiff',
$attribs = [
'id' => 'wpDiff',