The source project of this merge request has been removed.
Update functions.js.php
I fixed a wrong elementid reference which broke displaying of preview and direct download links (script exited with error before links where created). In addition i refactored creation of preview and direct download links a bit.