XW-2307 | Whitelist videos in Portable Infoboxes

This commit is contained in:
Damian Jozwiak 2016-11-22 13:02:56 +01:00
parent c9363473b2
commit 4acf41caef

View file

@ -58,7 +58,8 @@ class PortableInfoboxRenderServiceHelper {
$title = $data[ 'name' ];
$file = \WikiaFileHelper::getFileFromTitle( $title );
if ( !$file || !$file->exists() || !in_array( $file->getMediaType(), [ MEDIATYPE_BITMAP, MEDIATYPE_DRAWING ] ) ) {
if ( !$file || !$file->exists() ||
!in_array( $file->getMediaType(), [ MEDIATYPE_BITMAP, MEDIATYPE_DRAWING, MEDIATYPE_VIDEO ] ) ) {
return false;
}