Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | /** |
7 | 7 | * Bump this number when serialized cache records may be incompatible. |
8 | 8 | */ |
9 | | -define( 'MW_FILE_VERSION', 5 ); |
| 9 | +define( 'MW_FILE_VERSION', 6 ); |
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Class to represent a local file in the wiki's own database |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | |
159 | 159 | function getCacheFields( $prefix = 'img_' ) { |
160 | 160 | static $fields = array( 'size', 'width', 'height', 'bits', 'media_type', |
161 | | - 'major_mime', 'minor_mime', 'metadata', 'timestamp', 'sha1', 'user', 'user_text' ); |
| 161 | + 'major_mime', 'minor_mime', 'metadata', 'timestamp', 'sha1', 'user', 'user_text', 'description' ); |
162 | 162 | static $results = array(); |
163 | 163 | if ( $prefix == '' ) { |
164 | 164 | return $fields; |
— | — | @@ -720,6 +720,9 @@ |
721 | 721 | if ( !$props ) { |
722 | 722 | $props = $this->repo->getFileProps( $this->getVirtualUrl() ); |
723 | 723 | } |
| 724 | + $props['description'] = $comment; |
| 725 | + $props['user'] = $wgUser->getID(); |
| 726 | + $props['user_text'] = $wgUser->getName(); |
724 | 727 | $this->setProps( $props ); |
725 | 728 | |
726 | 729 | // Delete thumbnails and refresh the metadata cache |