Don't return links for shared files if disabled
Don't show links option in dropdown if disabled
Fix accidental deletion of if
readability: single line -> multiple lines