Add about to disable sources and make sure each source is set
parent
868c06929d
commit
0b609e882d
|
@ -2351,18 +2351,21 @@ class H5PCore {
|
||||||
*/
|
*/
|
||||||
public static function getDisable(&$sources) {
|
public static function getDisable(&$sources) {
|
||||||
$disable = H5PCore::DISABLE_NONE;
|
$disable = H5PCore::DISABLE_NONE;
|
||||||
if (!$sources['frame']) {
|
if (!isset($sources['frame']) || !$sources['frame']) {
|
||||||
$disable |= H5PCore::DISABLE_FRAME;
|
$disable |= H5PCore::DISABLE_FRAME;
|
||||||
}
|
}
|
||||||
if (!$sources['download']) {
|
if (!isset($sources['download']) || !$sources['download']) {
|
||||||
$disable |= H5PCore::DISABLE_DOWNLOAD;
|
$disable |= H5PCore::DISABLE_DOWNLOAD;
|
||||||
}
|
}
|
||||||
if (!$sources['copyright']) {
|
if (!isset($sources['copyright']) || !$sources['copyright']) {
|
||||||
$disable |= H5PCore::DISABLE_COPYRIGHT;
|
$disable |= H5PCore::DISABLE_COPYRIGHT;
|
||||||
}
|
}
|
||||||
if (!$sources['embed']) {
|
if (!isset($sources['embed']) || !$sources['embed']) {
|
||||||
$disable |= H5PCore::DISABLE_EMBED;
|
$disable |= H5PCore::DISABLE_EMBED;
|
||||||
}
|
}
|
||||||
|
if (!isset($sources['about']) || !$sources['about']) {
|
||||||
|
$disable |= H5PCore::DISABLE_ABOUT;
|
||||||
|
}
|
||||||
return $disable;
|
return $disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue