Fixed special case for export/download.

redesign-copyrights
Frode Petterson 2015-05-22 15:50:00 +02:00
parent d85815b3be
commit 3460e400a0
1 changed files with 1 additions and 4 deletions

View File

@ -2356,10 +2356,7 @@ class H5PCore {
*/ */
public function getDisable(&$sources, $current) { public function getDisable(&$sources, $current) {
foreach (H5PCore::$disable as $bit => $option) { foreach (H5PCore::$disable as $bit => $option) {
if ($option === 'download') { if ($this->h5pF->getOption(($bit & H5PCore::DISABLE_DOWNLOAD ? 'export' : $option), TRUE)) {
$option = 'export';
}
if ($this->h5pF->getOption($option, TRUE) ) {
if (!isset($sources[$option]) || !$sources[$option]) { if (!isset($sources[$option]) || !$sources[$option]) {
$current |= $bit; // Disable $current |= $bit; // Disable
} }