Making lines shorter [HFP-277]

improved-embed-and-download
Paal Joergensen 2016-12-16 13:27:40 +01:00
parent a1e68d212b
commit ea0362c3da
1 changed files with 21 additions and 5 deletions

View File

@ -2499,16 +2499,32 @@ class H5PCore {
if ($this->h5pF->getOption('frame', TRUE)) { if ($this->h5pF->getOption('frame', TRUE)) {
$display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE; $display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE;
// Download
$export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW);
if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { if ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON ||
$display_options['download'] = isset($current_display_options['showDownload']) ? $current_display_options['showDownload'] : ($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); $export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) {
$display_options['download'] =
isset($current_display_options['showDownload']) ?
$current_display_options['showDownload'] :
($export == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON);
} }
// Embed
$embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW); $embed = $this->h5pF->getOption('embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW);
if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON || $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) { if ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON ||
$display_options['embed'] = isset($current_display_options['showEmbed']) ? $current_display_options['showEmbed'] : ($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON); $embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF) {
$display_options['embed'] =
isset($current_display_options['showEmbed']) ?
$current_display_options['showEmbed'] :
($embed == H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON);
} }
// Copyright
if ($this->h5pF->getOption('copyright', TRUE)) { if ($this->h5pF->getOption('copyright', TRUE)) {
$display_options['copyright'] = isset($current_display_options['showCopyright']) ? $current_display_options['showCopyright'] : TRUE; $display_options['copyright'] =
isset($current_display_options['showCopyright']) ?
$current_display_options['showCopyright'] :
TRUE;
} }
} }