mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup lessphp specific for SnappyMail
This commit is contained in:
parent
a50b537892
commit
2d435fb42b
2 changed files with 829 additions and 1302 deletions
|
|
@ -7,9 +7,7 @@ trait Themes
|
||||||
public function GetTheme(bool $bAdmin): string
|
public function GetTheme(bool $bAdmin): string
|
||||||
{
|
{
|
||||||
static $sTheme;
|
static $sTheme;
|
||||||
if ($sTheme) {
|
if (!$sTheme) {
|
||||||
return $sTheme;
|
|
||||||
}
|
|
||||||
$sTheme = $this->Config()->Get('webmail', 'theme', 'Default');
|
$sTheme = $this->Config()->Get('webmail', 'theme', 'Default');
|
||||||
if (!$bAdmin
|
if (!$bAdmin
|
||||||
&& ($oAccount = $this->getAccountFromToken(false))
|
&& ($oAccount = $this->getAccountFromToken(false))
|
||||||
|
|
@ -18,6 +16,7 @@ trait Themes
|
||||||
$sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
|
$sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
|
||||||
}
|
}
|
||||||
$sTheme = $this->ValidateTheme($sTheme) ?: 'Default';
|
$sTheme = $this->ValidateTheme($sTheme) ?: 'Default';
|
||||||
|
}
|
||||||
return $sTheme;
|
return $sTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,9 +99,6 @@ trait Themes
|
||||||
$sTheme = \substr($sTheme, 0, -7);
|
$sTheme = \substr($sTheme, 0, -7);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oLess = new \LessPHP\lessc();
|
|
||||||
$oLess->setFormatter('compressed');
|
|
||||||
|
|
||||||
$aResult = array();
|
$aResult = array();
|
||||||
|
|
||||||
$sThemeCSSFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sTheme.'/styles.css';
|
$sThemeCSSFile = ($bCustomTheme ? APP_INDEX_ROOT_PATH : APP_VERSION_ROOT_PATH).'themes/'.$sTheme.'/styles.css';
|
||||||
|
|
@ -122,6 +118,6 @@ trait Themes
|
||||||
|
|
||||||
$aResult[] = $this->Plugins()->CompileCss($bAdmin);
|
$aResult[] = $this->Plugins()->CompileCss($bAdmin);
|
||||||
|
|
||||||
return $oLess->compile(\implode("\n", $aResult));
|
return (new \LessPHP\lessc())->compile(\implode("\n", $aResult));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue