HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
164 stars 19 forks source link

Replace globals by constants #163

Open HugoFara opened 7 months ago

HugoFara commented 7 months ago

LWT likes to use globals, by they are difficult to identify and edit. They should be replaced by something better adapted and more robust.

HugoFara commented 7 months ago

The same goes for functions returning always the same value: get_version and get_statuses in inc/kernel_utility.php. Version can also be constant in api.php.

HugoFara commented 7 months ago

For anything as connect*.inc.php, I am thinking of removing the file altogether. The new system may look like:

[settings]
server=localhost
userid=root

This is INI format, but YAML could be great as well, if anyone has another suggestion let me know!