mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 20:09:44 +00:00
XW-2307 | Whitelist videos in Portable Infoboxes
This commit is contained in:
parent
c9363473b2
commit
4acf41caef
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -116,7 +117,7 @@ class PortableInfoboxRenderServiceHelper {
|
|||
'firstImage' => $images[0],
|
||||
'mercuryComponentAttrs' => json_encode( $mercuryComponentAttrs )
|
||||
];
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -160,7 +161,7 @@ class PortableInfoboxRenderServiceHelper {
|
|||
*/
|
||||
public function isMercury() {
|
||||
global $wgArticleAsJson;
|
||||
|
||||
|
||||
return !empty( $wgArticleAsJson );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue