* @ingroup FileAbstraction
*/
class LocalFile extends File {
- const VERSION = 10; // cache version
+ const VERSION = 11; // cache version
const CACHE_FIELD_MAX_LEN = 1000;
static $results = [];
if ( $prefix == '' ) {
- return $fields;
+ return array_merge( $fields, [ 'description' ] );
}
-
if ( !isset( $results[$prefix] ) ) {
$prefixedFields = [];
foreach ( $fields as $field ) {
$encTimestamp = $dbw->addQuotes( $dbw->timestamp( $now ) );
$encUserId = $dbw->addQuotes( $this->user->getId() );
- $encReason = $dbw->addQuotes( $this->reason );
$encGroup = $dbw->addQuotes( 'deleted' );
$ext = $this->file->getExtension();
$dotExt = $ext === '' ? '' : ".$ext";
];
$joins = [];
- $fields += $commentStoreFaReason->insert( $dbw, $encReason );
+ $fields += array_map(
+ [ $dbw, 'addQuotes' ],
+ $commentStoreFaReason->insert( $dbw, $this->reason )
+ );
if ( $wgCommentTableSchemaMigrationStage <= MIGRATION_WRITE_BOTH ) {
$fields['fa_description'] = 'img_description';