pascalchevrel/langchecker — pull request #143 by flodolo (2014-07-03 09:17:31+00:00)
Title: Move template selection in class, add tests

* Moved template selection logic in Project::selectView, added tests.
* To get global status for a file is not necessary to provide a locale code anymore. If locale code and json are set, returned JSON record include only the requested locale (issue #141).
* Cleaned up $_GET variable, when they're available from inc/init.php ($json, $filename, $website).
* Global status: print an error (and return 400 in JSON mode) if website+file is not supported, avoid warnings for non existent website or locale.
* List locales for project: return code 400 if list of locales is empty. Don't display list of supported locales for website if the file is not valid.
* Renamed local $json variables to $json_data to avoid conflicts with global var $json.