fix code.
code fix
Merge pull request #3449 from openscholar/os_wysiwyg_link

fix code in module os_wysiwyg_link

Includes Refactors for #3466 and adds check code to fix php warnings