From: Victor Vasiliev Date: Sun, 20 Jan 2008 12:48:39 +0000 (+0000) Subject: * Fix image caching X-Git-Tag: 1.31.0-rc.0~49888 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=55cfccceb7e091f37211cd69da8c23b4c9abe237;p=lhc%2Fweb%2Fwiklou.git * Fix image caching --- diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 35012285fe..d763c57c2c 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -5,7 +5,7 @@ /** * Bump this number when serialized cache records may be incompatible. */ -define( 'MW_FILE_VERSION', 5 ); +define( 'MW_FILE_VERSION', 6 ); /** * Class to represent a local file in the wiki's own database @@ -157,7 +157,7 @@ class LocalFile extends File function getCacheFields( $prefix = 'img_' ) { static $fields = array( 'size', 'width', 'height', 'bits', 'media_type', - 'major_mime', 'minor_mime', 'metadata', 'timestamp', 'sha1', 'user', 'user_text' ); + 'major_mime', 'minor_mime', 'metadata', 'timestamp', 'sha1', 'user', 'user_text', 'description' ); static $results = array(); if ( $prefix == '' ) { return $fields; @@ -720,6 +720,9 @@ class LocalFile extends File if ( !$props ) { $props = $this->repo->getFileProps( $this->getVirtualUrl() ); } + $props['description'] = $comment; + $props['user'] = $wgUser->getID(); + $props['user_text'] = $wgUser->getName(); $this->setProps( $props ); // Delete thumbnails and refresh the metadata cache