X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FLocalFile.php;h=d22c9a61ed5705421c59128a25ba530801beab57;hb=b53f0c278f6cb84c3cbbcb3100231c8c7e2fd870;hp=254ceff1b06a54ded304a7247c0ed06682df782c;hpb=e3c441f50b1aac90c397a715e7f306d1237b6bf3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 254ceff1b0..d22c9a61ed 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1543,8 +1543,8 @@ class LocalFile extends File { } if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) { $tables[] = 'image_comment_temp'; - $fields['oi_description_id'] = - 'CASE WHEN img_description_id = 0 THEN imgcomment_description_id ELSE img_description_id END'; + $fields['oi_description_id'] = 'CASE WHEN img_description_id = 0 ' + . 'THEN COALESCE(imgcomment_description_id, 0) ELSE img_description_id END'; $joins['image_comment_temp'] = [ $wgCommentTableSchemaMigrationStage === MIGRATION_NEW ? 'JOIN' : 'LEFT JOIN', [ 'imgcomment_name = img_name' ] @@ -2539,8 +2539,8 @@ class LocalFileDeleteBatch { } if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) { $tables[] = 'image_comment_temp'; - $fields['fa_description_id'] = - 'CASE WHEN img_description_id = 0 THEN imgcomment_description_id ELSE img_description_id END'; + $fields['fa_description_id'] = 'CASE WHEN img_description_id = 0 ' + . 'THEN COALESCE(imgcomment_description_id, 0) ELSE img_description_id END'; $joins['image_comment_temp'] = [ $wgCommentTableSchemaMigrationStage === MIGRATION_NEW ? 'JOIN' : 'LEFT JOIN', [ 'imgcomment_name = img_name' ]