little fix for setup.php to save during installation chosen language - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: little fix for setup.php to save during installation chosen language (/showthread.php?tid=242) |
little fix for setup.php to save during installation chosen language - dniesel - 2010-03-03 I made a few installations of GetSimple in the past few days. After the third installation I realised, that it wasn't my fault that the language which I chose during installation, wasn't saved to website.xml. I stepped into it and found out, that on install.php you can choose a language (if you have more than en_US in your language folder on setup), but on setup.php this parameter isn't handled. So GetSimple falls back to en_US because the global $LANG is empty at this moment. So I directly include the chosen language (that for already the second step on installation will continue in your selected language) and write it to website.xml Attached patch in based on r116 little fix for setup.php to save during installation chosen language - ccagle8 - 2010-03-03 This was broken quite a while back when NY rewrote the functions.php/common.php code. http://code.google.com/p/get-simple-cms/source/diff?path=/trunk/admin/setup.php&format=side&r=55&old_path=/trunk/admin/setup.php&old=36 I've added that code back in. Thank you so much for all your hard work over the last week or so finding these bugs. i really appreciate it! little fix for setup.php to save during installation chosen language - dniesel - 2010-03-03 You're very welcome! As an (Ex) Software-Tester, finding bugs and errors runs in my blood ;-) But, I doubt, this doesn't fix the problem entirely. You have to put it along with the form on setup.php again - otherwise it falls back to standard after hitting "Install now!". But if you would like to use the $LANG in an hidden field of the form - I have to warn you: header.php changes the value of it from e.g. 'de_DE' to 'de'. Also the direct including of the lang-file helps to have the selected language already on page2 during installation. (As long, as website.xml isn't created, it will always fall back to en_US) little fix for setup.php to save during installation chosen language - ccagle8 - 2010-03-03 ok, let me look at this. Thanks again... |