Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/393354 )

Change subject: Kill off $wgStyleVersion
......................................................................

Kill off $wgStyleVersion

Bug: T181318
Change-Id: Ib5dce1c8d39a821aab0f96133780c18c827bde03
---
M includes/DefaultSettings.php
M includes/OutputPage.php
M includes/skins/Skin.php
3 files changed, 5 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/393354/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3cd7ef1..d51878c 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2549,15 +2549,6 @@
 $wgGitInfoCacheDirectory = false;
 
 /**
- * Bump this number when changing the global style sheets and JavaScript.
- *
- * It should be appended in the query string of static CSS and JS includes,
- * to ensure that client-side caches do not keep obsolete copies of global
- * styles.
- */
-$wgStyleVersion = '303';
-
-/**
  * This will cache static pages for non-logged-in users to reduce
  * database traffic on public sites. ResourceLoader requests to default
  * language and skins are cached as well as single module requests.
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index a5f9c18..8bb32c3 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -494,19 +494,15 @@
         *
         * @param string $file Filename in skins/common or complete on-server 
path
         *              (/foo/bar.js)
-        * @param string $version Style version of the file. Defaults to 
$wgStyleVersion
         */
-       public function addScriptFile( $file, $version = null ) {
+       public function addScriptFile( $file ) {
                // See if $file parameter is an absolute URL or begins with a 
slash
                if ( substr( $file, 0, 1 ) == '/' || preg_match( 
'#^[a-z]*://#i', $file ) ) {
                        $path = $file;
                } else {
                        $path = $this->getConfig()->get( 'StylePath' ) . 
"/common/{$file}";
                }
-               if ( is_null( $version ) ) {
-                       $version = $this->getConfig()->get( 'StyleVersion' );
-               }
-               $this->addScript( Html::linkedScript( wfAppendQuery( $path, 
$version ) ) );
+               $this->addScript( Html::linkedScript( $path ) );
        }
 
        /**
@@ -3739,8 +3735,7 @@
                        $url = $style;
                } else {
                        $config = $this->getConfig();
-                       $url = $config->get( 'StylePath' ) . '/' . $style . '?' 
.
-                               $config->get( 'StyleVersion' );
+                       $url = $config->get( 'StylePath' ) . '/' . $style;
                }
 
                $link = Html::linkedStyle( $url, $media );
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 07964a4..94405fc 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -1089,14 +1089,14 @@
         * @throws MWException
         */
        function getSkinStylePath( $name ) {
-               global $wgStylePath, $wgStyleVersion;
+               global $wgStylePath;
 
                if ( $this->stylename === null ) {
                        $class = static::class;
                        throw new MWException( "$class::\$stylename must be set 
to use getSkinStylePath()" );
                }
 
-               return "$wgStylePath/{$this->stylename}/$name?$wgStyleVersion";
+               return "$wgStylePath/{$this->stylename}/$name";
        }
 
        /* these are used extensively in SkinTemplate, but also some other 
places */

-- 
To view, visit https://gerrit.wikimedia.org/r/393354
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5dce1c8d39a821aab0f96133780c18c827bde03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to