-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add config option to allow the use of the default local repo, rather than $diagramsRepo
#44
base: master
Are you sure you want to change the base?
Conversation
Thanks for this! I wonder if actually that should be the default? I can't remember now what the point of having the subdirectory was (I think that's the only point of the custom LocalRepo). It's definitely neater, but it does seem that if people want to keep the generated files out of their main file store then they should use the Diagrams service. Maybe it's too late to change the default now though… |
I don't think it necessarily needs to be default, given that most people probably do still leave the repo settings as is and host files locally (and Mediawiki doesn't encourage or even document anything else very well). I'd imagine the only reason for using a separate repo in the first place was to get the |
Yes, that makes sense, good points! Do you know what specifically is making it not be compatible with your local repo configuration? It seems that the best thing would be for it to be made compatible, then it'd work for everyone. Are there missing or incorrect config values in this?
Some others are: 'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription', 'thumbScriptUrl', 'pathDisclosureProtection', 'descriptionCacheExpiry', 'favicon', 'thumbProxyUrl', 'thumbProxySecret', 'disableLocalTransform', If we can't get that to work, then the config flag is fine. I do wonder about calling it something different though, such as
|
In our case I think it's the
Note that most of the other values are missing anyway - either because they don't apply in our case or don't apply to Swift storage - but that this is still a valid repo. I suspect that with the plethora of available storage settings, a one-size-fits-all approach won't always work, and trying to correctly handle all possible use cases for the sake of a If backwards-compatibility weren't necessary I'd suggest just dropping the new repo altogether, but people might lose access to their existing diagrams! |
I'm sorry that I've neglected this for so long. :-( I agree with you, it'd be best to not have to worry about having a separate What do you think about the |
I've neglected it too! The |
Great! Did you mean to close this? |
In cases where file storage uses a non-local backend, assumptions made in
$diagramsRepo
do not always work. In our instance, Mediawiki file storage is on a Swift-compatible backend which proved to be incompatible with$diagramsRepo
, but using$localRepo
as set byMediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
worked as expected.This change therefore adds a config value to allow the use of the default local repo rather than the one created in
renderLocally()
, for this and other use cases where the user may want to use the same repo settings as for other uploaded files. By default, it does not change the current behaviour.