From ea0362c3da73e5a3d5aa3b731a22adbc7f4890b8 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Fri, 16 Dec 2016 13:27:40 +0100 Subject: [PATCH] Making lines shorter [HFP-277] --- h5p.classes.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 7a71041..302242e 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2499,16 +2499,32 @@ class H5PCore { if ($this->h5pF->getOption('frame', TRUE)) { $display_options['frame'] = isset($current_display_options['showFrame']) ? $current_display_options['showFrame'] : TRUE; + // Download $export = $this->h5pF->getOption('export', H5PDisplayOptionBehaviour::ALWAYS_SHOW); - if ($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); + if ($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); - if ($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); + if ($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)) { - $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; } }