From 4a68d17b02f080189ee4aad6359f178b1c8fed78 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 20 Oct 2015 22:36:53 +0100 Subject: [PATCH] Remove $wgAjaxWatch configuration variable This is now enabled by default. We still check $wgUseAjax and $wgEnableWriteAPI, however. Originally introduced in r18598 (69ea9bcf9b; MediaWiki 1.9.0; T9169). Change-Id: I87b1926e727ae0870a0239d6e8ad87cc3a5ad72b --- RELEASE-NOTES-1.27 | 3 ++- includes/DefaultSettings.php | 6 ------ includes/skins/Skin.php | 4 ++-- maintenance/dictionary/mediawiki.dic | 1 - 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 2c64b2dc12..7d4ac3dcb4 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -9,7 +9,7 @@ MediaWiki 1.27 is an alpha-quality branch and is not recommended for use in production. === Configuration changes in 1.27 === -* Removed $wgUseLinkNamespaceDBFields +* $wgUseLinkNamespaceDBFields was removed. * Deprecated $wgResourceLoaderMinifierStatementsOnOwnLine and $wgResourceLoaderMinifierMaxLineLength, because there was little value in making the behavior configurable. The default values (`false` for the former, @@ -44,6 +44,7 @@ production. ** A new constructor, User::newSystemUser(), has been added to simplify the creation of passwordless "system" users for logged actions. * $wgMaxSquidPurgeTitles was removed. +* $wgAjaxWatch was removed. This is now enabled by default. === New features in 1.27 === * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7b196cb3d8..8908f10ea0 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -7341,12 +7341,6 @@ $wgUseAjax = true; */ $wgAjaxExportList = array(); -/** - * Enable watching/unwatching pages using AJAX. - * Requires $wgUseAjax to be true too. - */ -$wgAjaxWatch = true; - /** * Enable AJAX check for file overwrite, pre-upload */ diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 4e6201cd73..12ebb5432f 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -180,7 +180,7 @@ abstract class Skin extends ContextSource { * @return array Array of modules with helper keys for easy overriding */ public function getDefaultModules() { - global $wgUseAjax, $wgAjaxWatch, $wgEnableAPI, $wgEnableWriteAPI; + global $wgUseAjax, $wgEnableAPI, $wgEnableWriteAPI; $out = $this->getOutput(); $user = $out->getUser(); @@ -201,7 +201,7 @@ abstract class Skin extends ContextSource { // Add various resources if required if ( $wgUseAjax && $wgEnableAPI ) { - if ( $wgEnableWriteAPI && $wgAjaxWatch && $user->isLoggedIn() + if ( $wgEnableWriteAPI && $user->isLoggedIn() && $user->isAllowedAll( 'writeapi', 'viewmywatchlist', 'editmywatchlist' ) && $this->getRelevantTitle()->canExist() ) { diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index 8e4e5314ee..2322909c27 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -433,7 +433,6 @@ aiff aiprop airtel aisort -ajaxwatch al alefsym algo -- 2.20.1