resourceloader: Remove deprecated ResourceLoaderGetLessVars hook

Deprecated since 1.30, only had one caller (MobileFrontend)
which has been fixed since.

Bug: T140804
Change-Id: I39b594e3082ebe321bae463780cfadbfb3de1d5c
This commit is contained in:
Timo Tijhof 2018-04-10 15:07:18 +01:00
parent d13aa39760
commit cec597e2b3
3 changed files with 5 additions and 10 deletions

View file

@ -334,6 +334,9 @@ changes to languages because of Phabricator reports.
* HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25, have been removed.
* The ProfileSection class, deprecated in 1.25 and unused, has been removed.
* Wikimedia\Rdbms\SavepointPostgres is deprecated.
* The ResourceLoaderGetLessVars hook, deprecated in 1.30, has been removed.
Use ResourceLoaderModule::getLessVars() to expose local variables instead
of global ones.
== Compatibility ==
MediaWiki 1.31 requires PHP 5.5.9 or later. Although HHVM 3.18.5 or later is supported,

View file

@ -2795,12 +2795,6 @@ configuration variables to JavaScript. Things that depend on the current page
or request state must be added through MakeGlobalVariablesScript instead.
&$vars: array( variable name => value )
'ResourceLoaderGetLessVars': DEPRECATED! Called in ResourceLoader::getLessVars
to add global LESS variables. Loaded after $wgResourceLoaderLESSVars is added.
Global LESS variables are deprecated. Use ResourceLoaderModule::getLessVars()
instead to expose variables only in modules that need them.
&$lessVars: array of variables already added
'ResourceLoaderJqueryMsgModuleMagicWords': Called in
ResourceLoaderJqueryMsgModule to allow adding magic words for jQueryMsg.
The value should be a string, and they can depend only on the

View file

@ -1723,10 +1723,8 @@ MESSAGE;
* @return array Map of variable names to string CSS values.
*/
public function getLessVars() {
if ( !$this->lessVars ) {
$lessVars = $this->config->get( 'ResourceLoaderLESSVars' );
Hooks::run( 'ResourceLoaderGetLessVars', [ &$lessVars ] );
$this->lessVars = $lessVars;
if ( $this->lessVars === null ) {
$this->lessVars = $this->config->get( 'ResourceLoaderLESSVars' );
}
return $this->lessVars;
}