tetsuo13 / MediaWiki-to-DokuWiki-Importer

Convert MediaWiki to DokuWiki
31 stars 10 forks source link

Get the correct image src paths #13

Closed sockenklaus closed 12 years ago

sockenklaus commented 12 years ago

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

tetsuo13 commented 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.

sockenklaus commented 12 years ago

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 commented 12 years ago

Thank you.