make inline pdf a security option, move thumbnail security to security options from admin/site

(cherry picked from commit de9a7f0fa909792656d26d369f2ff21c57fc1e4d)
This commit is contained in:
Mario
2019-11-15 09:55:44 +00:00
parent a974d0d52d
commit fd7d497cd1
5 changed files with 15 additions and 8 deletions

View File

@@ -146,7 +146,7 @@ function oembed_fetch_url($embedurl){
$txt = Cache::get('[' . App::$videowidth . '] ' . $furl);
}
if(strpos(strtolower($embedurl),'.pdf') !== false) {
if(strpos(strtolower($embedurl),'.pdf') !== false && get_config('system','inline_pdf')) {
$action = 'allow';
$j = [
'html' => '<object data="' . $embedurl . '" type="application/pdf" style="width: 100%; height: 300px;"></object>',