diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 3f9ae39d982da0a332abbbd72c5602b883b7ecc6..73ba43bbe7563a3af85b6a208a20e39e67ed5cbb 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -302,9 +302,9 @@ class StandardFile implements FileType, ArrayAccess ); } - if (Config::get()->OER_ENABLE_SUGGESTIONS && - ($this->getTermsOfUse()->id === 'SELFMADE_NONPUB' || $this->getTermsOfUse()->id === 'FREE_LICENSE') && - $this->fileref->getAuthorName() != User::findCurrent()->getFullName('no_title_rev') + if (Config::get()->OERCAMPUS_ENABLED && Config::get()->OER_ENABLE_SUGGESTIONS && + $GLOBALS['user']->id !== 'nobody' && $this->fileref->user_id !== $GLOBALS['user']->id && + in_array($this->fileref->content_terms_of_use_id, ['SELFMADE_NONPUB', 'FREE_LICENSE']) ) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id),