Core/Config

* convert configuration from list of constants to object
 * fixes config changes not applying on cli whithout closing and reopening again
 * config variables are no longer embedded in localization text
This commit is contained in:
Sarjuuk
2024-05-28 15:41:44 +02:00
parent 454e09cc78
commit f77d676a19
94 changed files with 1094 additions and 922 deletions

View File

@@ -161,7 +161,7 @@ class UserPage extends GenericPage
'_totalCount' => $nFound
);
if ($nFound > CFG_SQL_LIMIT_DEFAULT)
if ($nFound > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['name'] = '$LANG.tab_latestcomments';
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_usercomments, '.$nFound.')';
@@ -180,7 +180,7 @@ class UserPage extends GenericPage
'_totalCount' => $nFound
);
if ($nFound > CFG_SQL_LIMIT_DEFAULT)
if ($nFound > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['name'] = '$LANG.tab_latestreplies';
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_userreplies, '.$nFound.')';
@@ -197,7 +197,7 @@ class UserPage extends GenericPage
'_totalCount' => $nFound
);
if ($nFound > CFG_SQL_LIMIT_DEFAULT)
if ($nFound > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['name'] = '$LANG.tab_latestscreenshots';
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_userscreenshots, '.$nFound.')';
@@ -214,7 +214,7 @@ class UserPage extends GenericPage
'_totalCount' => $nFound
);
if ($nFound > CFG_SQL_LIMIT_DEFAULT)
if ($nFound > Cfg::get('SQL_LIMIT_DEFAULT'))
{
$tabData['name'] = '$LANG.tab_latestvideos';
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_uservideos, '.$nFound.')';