Closed sockenklaus closed 12 years ago
Good catch! I haven't been able to do a lot of testing with image conversions.
I'd like to have more code reuse if possible. Instead of calling getLocalSettingsPath()
, please change it so that $mwikiSettingsPath
(declared on line 61) is passed in to convert()
and then passed in to processImage()
. This way the function is only called once during the start of the program.
I defined a constant "MWIKI_ROOT" and used it during the img conversion. I think this is a little bit more elegant instead of passing aroung lots of arguments.
Thank you.
This commit checks whether the script is invoked via CLI or webbrowser and gets the correct image src path for both methods.