mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 23:08:08 +08:00
Moved application.ini labs.use_app_debug_* to debug.*
This commit is contained in:
parent
d1b31c6822
commit
4261bdafff
4 changed files with 21 additions and 12 deletions
|
@ -879,7 +879,7 @@ class Actions
|
|||
? './?/Plugins/0/' . ($bAdmin ? 'Admin' : 'User') . '/' . $sStaticCache . '/'
|
||||
: '';
|
||||
|
||||
$bAppJsDebug = $this->oConfig->Get('labs', 'use_app_debug_js', false)
|
||||
$bAppJsDebug = $this->oConfig->Get('debug', 'javascript', false)
|
||||
|| $this->oConfig->Get('debug', 'enable', false);
|
||||
|
||||
$aResult['StaticLibsJs'] = Utils::WebStaticPath('js/' . ($bAppJsDebug ? '' : 'min/') .
|
||||
|
|
|
@ -91,10 +91,17 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
|
||||
public function Set(string $sSectionKey, string $sParamKey, $mParamValue) : void
|
||||
{
|
||||
if ('labs' === $sSectionKey && \str_contains($sParamKey, 'imap_')) {
|
||||
// This is a workaround for the changed application structure
|
||||
$sSectionKey = 'imap';
|
||||
$sParamKey = \str_replace('imap_', '', $sParamKey);
|
||||
// Workarounds for the changed application structure
|
||||
if ('labs' === $sSectionKey) {
|
||||
if (\str_contains($sParamKey, 'imap_')) {
|
||||
$sSectionKey = 'imap';
|
||||
$sParamKey = \str_replace('imap_', '', $sParamKey);
|
||||
}
|
||||
if (\str_contains($sParamKey, 'use_app_debug_')) {
|
||||
$sSectionKey = 'debug';
|
||||
$sParamKey = \str_replace('use_app_debug_js', 'javascript', $sParamKey);
|
||||
$sParamKey = \str_replace('use_app_debug_css', 'css', $sParamKey);
|
||||
}
|
||||
}
|
||||
parent::Set($sSectionKey, $sParamKey, $mParamValue);
|
||||
}
|
||||
|
@ -336,7 +343,11 @@ Examples:
|
|||
),
|
||||
|
||||
'debug' => array(
|
||||
'enable' => array(false, 'Special option required for development purposes')
|
||||
'enable' => array(false, 'Special option required for development purposes'),
|
||||
// use_app_debug_js
|
||||
'javascript' => array(false),
|
||||
// use_app_debug_css
|
||||
'css' => array(false)
|
||||
),
|
||||
|
||||
'cache' => array(
|
||||
|
@ -376,8 +387,6 @@ Enables caching in the system'),
|
|||
'allow_html_editor_biti_buttons' => array(false),
|
||||
'allow_ctrl_enter_on_compose' => array(true),
|
||||
'try_to_detect_hidden_images' => array(false),
|
||||
'use_app_debug_js' => array(false),
|
||||
'use_app_debug_css' => array(false),
|
||||
'smtp_show_server_errors' => array(false),
|
||||
'sieve_auth_plain_initial' => array(true),
|
||||
'sieve_allow_fileinto_inbox' => array(false),
|
||||
|
|
|
@ -140,8 +140,8 @@ abstract class Service
|
|||
$sLanguage = $oActions->GetLanguage($bAdmin);
|
||||
|
||||
$bAppDebug = $oConfig->Get('debug', 'enable', false);
|
||||
$sAppJsMin = $bAppDebug || $oConfig->Get('labs', 'use_app_debug_js', false) ? '' : '.min';
|
||||
$sAppCssMin = $bAppDebug || $oConfig->Get('labs', 'use_app_debug_css', false) ? '' : '.min';
|
||||
$sAppJsMin = $bAppDebug || $oConfig->Get('debug', 'javascript', false) ? '' : '.min';
|
||||
$sAppCssMin = $bAppDebug || $oConfig->Get('debug', 'css', false) ? '' : '.min';
|
||||
|
||||
$sFaviconUrl = (string) $oConfig->Get('webmail', 'favicon_url', '');
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ class ServiceActions
|
|||
\header('Content-Type: application/javascript; charset=utf-8');
|
||||
|
||||
$bAppDebug = $this->Config()->Get('debug', 'enable', false);
|
||||
$sMinify = ($bAppDebug || $this->Config()->Get('labs', 'use_app_debug_js', false)) ? '' : 'min';
|
||||
$sMinify = ($bAppDebug || $this->Config()->Get('debug', 'javascript', false)) ? '' : 'min';
|
||||
|
||||
$bCacheEnabled = !$bAppDebug && $this->Config()->Get('labs', 'cache_system_data', true);
|
||||
if ($bCacheEnabled) {
|
||||
|
@ -499,7 +499,7 @@ class ServiceActions
|
|||
$sTheme = $this->oActions->ValidateTheme($this->aPaths[4]);
|
||||
|
||||
$bAppDebug = $this->Config()->Get('debug', 'enable', false);
|
||||
$sMinify = ($bAppDebug || $this->Config()->Get('labs', 'use_app_debug_css', false)) ? '' : 'min';
|
||||
$sMinify = ($bAppDebug || $this->Config()->Get('debug', 'css', false)) ? '' : 'min';
|
||||
|
||||
$bCacheEnabled = !$bAppDebug && $this->Config()->Get('labs', 'cache_system_data', true);
|
||||
if ($bCacheEnabled) {
|
||||
|
|
Loading…
Reference in a new issue