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

Get the correct image src paths #13

Merged
merged 4 commits into from
Aug 10, 2012
Merged

Get the correct image src paths #13

merged 4 commits into from
Aug 10, 2012

Conversation

sockenklaus
Copy link
Contributor

This commit checks whether the script is invoked via CLI or webbrowser and gets the correct image src path for both methods.

@tetsuo13
Copy link
Owner

tetsuo13 commented Aug 9, 2012

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.

@sockenklaus
Copy link
Contributor Author

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.

tetsuo13 added a commit that referenced this pull request Aug 10, 2012
Use base path to MediaWiki when converting images.
@tetsuo13 tetsuo13 merged commit 8ab2c8c into tetsuo13:master Aug 10, 2012
@tetsuo13
Copy link
Owner

Thank you.

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

Successfully merging this pull request may close these issues.

2 participants