From 5f898dcc5ee244e4adbd6aa83b607c844d432fb6 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:17:22 +0200 Subject: Modernize Constants and use new constant for string 'currentUser' (#5089) * Modernize Constants and use new constant 'currentUser' * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Models/Auth.php * Update p/api/greader.php * Update p/api/greader.php * Update p/api/greader.php * Update app/Models/Context.php * Update app/Models/LogDAO.php * Update lib/Minz/Log.php * Update p/api/greader.php * Update app/layout/header.phtml * Update app/views/helpers/export/articles.phtml * Update cli/do-install.php * Remarque's from Alkarex * Remarque's from Alkarex * Refactor using new Minz_User class * Consistent naming of public constants --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- constants.php | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'constants.php') diff --git a/constants.php b/constants.php index ce67e7a91..d2b76fb64 100644 --- a/constants.php +++ b/constants.php @@ -2,25 +2,26 @@ //NB: Do not edit; use ./constants.local.php instead. // -define('FRESHRSS_MIN_PHP_VERSION', '7.2.0'); -define('FRESHRSS_VERSION', '1.21.1-dev'); -define('FRESHRSS_WEBSITE', 'https://freshrss.org'); -define('FRESHRSS_WIKI', 'https://freshrss.github.io/FreshRSS/'); - -define('APP_NAME', 'FreshRSS'); - -define('FRESHRSS_PATH', __DIR__); -define('PUBLIC_PATH', FRESHRSS_PATH . '/p'); -define('PUBLIC_TO_INDEX_PATH', '/i'); -define('INDEX_PATH', PUBLIC_PATH . PUBLIC_TO_INDEX_PATH); -define('PUBLIC_RELATIVE', '..'); -define('LIB_PATH', FRESHRSS_PATH . '/lib'); -define('APP_PATH', FRESHRSS_PATH . '/app'); -define('I18N_PATH', APP_PATH . '/i18n'); -define('CORE_EXTENSIONS_PATH', LIB_PATH . '/core-extensions'); -define('TESTS_PATH', FRESHRSS_PATH . '/tests'); +const FRESHRSS_MIN_PHP_VERSION = '7.2.0'; +const FRESHRSS_VERSION = '1.21.1-dev'; +const FRESHRSS_WEBSITE = 'https://freshrss.org'; +const FRESHRSS_WIKI = 'https://freshrss.github.io/FreshRSS/'; + +const APP_NAME = 'FreshRSS'; + +const FRESHRSS_PATH = __DIR__; +const PUBLIC_PATH = FRESHRSS_PATH . '/p'; +const PUBLIC_TO_INDEX_PATH = '/i'; +const INDEX_PATH = PUBLIC_PATH . PUBLIC_TO_INDEX_PATH; +const PUBLIC_RELATIVE = '..'; +const LIB_PATH = FRESHRSS_PATH . '/lib'; +const APP_PATH = FRESHRSS_PATH . '/app'; +const I18N_PATH = APP_PATH . '/i18n'; +const CORE_EXTENSIONS_PATH = LIB_PATH . '/core-extensions'; +const TESTS_PATH = FRESHRSS_PATH . '/tests'; // + if (file_exists(__DIR__ . '/constants.local.php')) { //Include custom / local settings: include(__DIR__ . '/constants.local.php'); -- cgit v1.2.3