Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use correct config #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

t-oster
Copy link

@t-oster t-oster commented Apr 4, 2023

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.

Thomas Oster and others added 2 commits April 4, 2023 10:34
…her places than bootstrap the default config and not the configured values will be returned.

Fixes clonemeagain#61
@buff0k
Copy link

buff0k commented Nov 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants