master
// if ($permHandler->isAllowed($GLOBALS['xoopsUser'], 'public_download_original', $photo->getVar('cat_id')) && $photo->getVar('photo_orig_name') != "") {