Open t-oster opened 1 year ago
This fixes an issue on 1.17.5 and 1.18 where the plugin fails to install and/or crashes osTicket, suggest this fix be merged, however underlying issue with pdf (audio and video as well) not implementing still present, likely in .js
The getConfig() mehtod only works correctly in the bootstrap method of the plugin. In all other mehtods, it will only return the default configuration, which causes #61
This PR will save the correct configuration in a static variable during the bootstrap call and override the getConfig method to return that variable, if it is set.
The only thing where this could cause problems is if you have multiple instances of this plugin, which is a new feature of OsTicket (where I have no idea for a use case), but I cannot imagine a useful scenario where you would need multiple instances of the Attachment Preview Plugin.