Update RELEASE-NOTES-1.34 for various backports
[lhc/web/wiklou.git] / includes / deferred / CdnCacheUpdate.php
index a867f20..b983e97 100644 (file)
@@ -39,8 +39,9 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
        }
 
        public function merge( MergeableUpdate $update ) {
-               /** @var CdnCacheUpdate $update */
+               /** @var self $update */
                Assert::parameterType( __CLASS__, $update, '$update' );
+               '@phan-var self $update';
 
                $this->urls = array_merge( $this->urls, $update->urls );
        }
@@ -59,9 +60,12 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
                        $urlArr = array_merge( $urlArr, $title->getCdnUrls() );
                }
 
-               return new self( $urlArr );
+               return new CdnCacheUpdate( $urlArr );
        }
 
+       /**
+        * Purges the list of URLs passed to the constructor.
+        */
        public function doUpdate() {
                global $wgCdnReboundPurgeDelay;
 
@@ -133,7 +137,7 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
                                foreach ( $chunks as $chunk ) {
                                        $client = new SquidPurgeClient( $server );
                                        foreach ( $chunk as $url ) {
-                                               $client->queuePurge( $url );
+                                               $client->queuePurge( self::expand( $url ) );
                                        }
                                        $pool->addClient( $client );
                                }
@@ -250,7 +254,7 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
         * @param string $url
         * @return string
         */
-       public static function expand( $url ) {
+       private static function expand( $url ) {
                return wfExpandUrl( $url, PROTO_INTERNAL );
        }