Commit graph

44 commits

Author SHA1 Message Date
f2edf4910a Switch to YAML configuration file, add Config & App classes in EesyPHP namespace
App initialization is now handle by App::init() method and all 
configuration information is now retreive using Config::get() method.
2023-02-08 02:27:15 +01:00
5496ff55c0 Initialize Tpl lib in CLI mode to allow handling templates files messages translation 2023-01-31 01:06:41 +01:00
93c38689db Fix moving common helper functions to EesyPHP namespace 2023-01-31 00:58:26 +01:00
d30abeb008 Move date parse/format helpers in dedicated class in EesyPHP namespace 2023-01-31 00:56:44 +01:00
1fff8f0af4 Move templating stuff in EesyPHP namespace 2023-01-31 00:30:04 +01:00
Benjamin Renard
d422afa66e
smarty_table_ordered_th: fix computing URL 2023-01-30 11:24:13 +01:00
Benjamin Renard
541b447cbf
Move DB stuff in EesyPHP namespace 2023-01-30 11:23:35 +01:00
c8659ea46f Move CLI stuff in EesyPHP namespace 2023-01-30 00:11:26 +01:00
5e8a2b6d1c Move translation (i18n) stuff in EesyPHP namespace 2023-01-29 23:35:17 +01:00
15c2acee08 Move session stuff in EesyPHP namespace 2023-01-29 22:34:43 +01:00
cf6ea5480b Move hooks stuff in EesyPHP namespace 2023-01-29 19:57:26 +01:00
c10ed0ca20 Move email stuff in EesyPHP namespace 2023-01-29 19:56:33 +01:00
27af166466 Move Url stuff in EesyPHP namespace 2023-01-29 19:18:10 +01:00
a303f188f3 Move Sentry stuff in EesyPHP namespace 2023-01-29 18:17:50 +01:00
3b45768967 Move functions and logging stuff in EesyPHP namespace 2023-01-29 18:04:49 +01:00
6fdc5447f1 Some improvments from recent works on apps based on its "framework"
* Code cleaning and fix some small errors using Phpstan
* Configure pre-commit to run Phpstan before each commit
* Some little improvments and logging, mail, smarty & URL libs
* Add Sentry integration
* Add Webstat JS code inclusion
* Install Smarty dependency using composer

Breaking changes:
* Rename Event class as HookEvent to avoid conflict with PECL event
* URL with refresh GET parameter now automatically trigger redirection without it
 after page loading to avoid to keep it in URL
2023-01-29 11:51:41 +01:00
Benjamin Renard
01759fb4c2 Fix handling authentication
- URL routes now defaulty required authentication if
  force_authentication special function is defined.
- handle_request() now trigger a fatal error if user try to access to
  a required route and if force_authentication function is not defined.
- logging() now retreive username from $auth_user['username'].
2022-04-25 18:42:18 +02:00
Benjamin Renard
e533ec9148 Remove unused $lang template variable 2022-04-24 20:19:28 +02:00
Benjamin Renard
0219714d4a Fix JS translations loading method to make translations available earlier 2022-04-24 20:17:48 +02:00
Benjamin Renard
3a61299005 Add handler for common HTTP errors 2022-04-24 19:11:37 +02:00
Benjamin Renard
2c7689a43d fatal_error now accept extra parameter for error message formating 2022-04-24 18:51:59 +02:00
Benjamin Renard
6b20a4a526 smarty: fix handling extra parameters in add_error() & add_message() 2022-04-24 18:51:30 +02:00
Benjamin Renard
dba4c6fa9e Make logging & message handling functions accept extra parameters to format messages using sprintf 2022-04-24 18:29:21 +02:00
Benjamin Renard
efc7352404 Code cleaning 2022-04-24 17:43:44 +02:00
Benjamin Renard
9886cb0720 Switch to SUXUMI bootstrap4dialog lib 2022-04-24 16:52:44 +02:00
Benjamin Renard
444c1ec2fc Improve translations
- Add support for translations in JavaScript code using babel lib and
  a custom PO file converter to JSON (using sepia/po-parser lib for
  PO files parsing)
- Put translation CLI commands in a dedicated file
- update_messages CLI command now provide PO file initialization feature
  using msginit and support of compendium files
2022-04-24 16:46:38 +02:00
Benjamin Renard
a7e4ea8168 Add update_messages & compile_messages CLI commands 2021-10-07 20:59:40 +02:00
Benjamin Renard
6684efab2f Improve CLI usage message format 2021-10-07 20:49:07 +02:00
Benjamin Renard
4bb16803bf Fix logging in run_external_command() 2021-10-07 20:47:26 +02:00
Benjamin Renard
5dd35cabb2 translation: improve initialization
- Keep current language in session
- allow selection using lang request parameter
- allow reseting current language using reset_lang request parameter
- improve logging problems
- add 'Hello word!' test to validate initializatio
2021-10-07 20:46:13 +02:00
Benjamin Renard
6d8abbf391 Always detect requested URL from REQUEST_URI
It's permit to access raw URL parameter values without automatic 
urldecode when access using $_GET or $_REQUEST. Also add 
UrlRequest::get_param() method that allow to access raw parameters 
values (without any decoding).
2021-07-28 18:18:36 +02:00
Benjamin Renard
a120571e62 CLI: add --trace parameter 2021-07-28 17:17:41 +02:00
Benjamin Renard
b10ba6cb73 Remove duplicated $log_file declaration in config file 2021-07-28 17:17:22 +02:00
Benjamin Renard
451b924cd1 Always include mail.php 2021-07-28 17:16:57 +02:00
Benjamin Renard
6d8812abb5 display_ajax_return(): Return HTTP 400 error code if success==false in retourned data 2021-07-28 17:16:43 +02:00
Benjamin Renard
d76c21c526 display_ajax_return(): add $pretty parameter 2021-07-28 17:15:46 +02:00
Benjamin Renard
e936064b78 Add translation system and improve URL routing system 2021-07-28 17:13:10 +02:00
Benjamin Renard
ec452a1ff4 Use php-unidecode instead of incomplete without_accent() function 2021-07-28 16:12:01 +02:00
Benjamin Renard
47a1d09e54 Set HTTP reponse code to 500 on FATAL error 2020-11-30 10:47:09 +01:00
Benjamin Renard
a80208adc0 logging: Add TRACE log level 2020-11-30 10:46:52 +01:00
Benjamin Renard
af1d112ae5 Move session stuff in dedicated file 2020-11-18 18:53:47 +01:00
Benjamin Renard
254ac22a64 Improve CLI usage message 2020-11-18 18:33:39 +01:00
63bab08c48 Add some documentation 2020-04-18 01:25:49 +02:00
699b7c4d1f Initial version 2020-04-18 00:51:33 +02:00