Merge "FauxRequest: don’t override getValues()"
[lhc/web/wiklou.git] / includes / filerepo / file / File.php
index 0d5776b..73b08e6 100644 (file)
@@ -1467,13 +1467,15 @@ abstract class File implements IDBAccessObject {
                // Delete thumbnails and refresh file metadata cache
                $this->purgeCache();
                $this->purgeDescription();
-
                // Purge cache of all pages using this file
                $title = $this->getTitle();
                if ( $title ) {
-                       DeferredUpdates::addUpdate(
-                               new HTMLCacheUpdate( $title, 'imagelinks', 'file-purge' )
+                       $job = HTMLCacheUpdateJob::newForBacklinks(
+                               $title,
+                               'imagelinks',
+                               [ 'causeAction' => 'file-purge' ]
                        );
+                       JobQueueGroup::singleton()->lazyPush( $job );
                }
        }
 
@@ -2040,7 +2042,7 @@ abstract class File implements IDBAccessObject {
         * Get the URL of the image description page. May return false if it is
         * unknown or not applicable.
         *
-        * @return string
+        * @return string|bool
         */
        function getDescriptionUrl() {
                if ( $this->repo ) {