From 55cfccceb7e091f37211cd69da8c23b4c9abe237 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 20 Jan 2008 12:48:39 +0000 Subject: [PATCH] * Fix image caching --- includes/filerepo/LocalFile.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.20.1