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

Replace globals by constants #163

Open
HugoFara opened this issue Dec 25, 2023 · 2 comments
Open

Replace globals by constants #163

HugoFara opened this issue Dec 25, 2023 · 2 comments
Labels
enhancement Develop an existing feature
Milestone

Comments

@HugoFara
Copy link
Owner

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

  • Constants: everything in connect.inc.php and inc/settings.php.
  • Session variables to put under $_SESSION: the ominous $tbpref and his friend $fixed_tbpref. $DBCONNECTION as well. $langDefs needs more work.
@HugoFara HugoFara added the enhancement Develop an existing feature label Dec 25, 2023
@HugoFara HugoFara added this to the LWT 3 milestone Dec 25, 2023
HugoFara added a commit that referenced this issue Dec 26, 2023
…anguage rename (#113).

JS Doc is added with JS DOC and PHP Doc with phpDocumentor.
New global LWT_LANGUAGES_ARRAY.
When renaming a language, text to speech was broken, it is fixed.
@HugoFara
Copy link
Owner Author

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 added a commit that referenced this issue Dec 29, 2023
@HugoFara
Copy link
Owner Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Develop an existing feature
Projects
Status: Todo
Development

No branches or pull requests

1 participant