',"\n
", $sText);
$sText = strip_tags($sText, '');
$sText = preg_replace("/\n\\s+\n/", "\n", $sText);
diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
index 9f80109c5..e6a525ebd 100644
--- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
+++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php
@@ -1295,7 +1295,7 @@ class Actions
$aResult['Language'] = $this->ValidateLanguage($sLanguage);
$aResult['UserLanguage'] = $bUserLanguage;
$aResult['LangLink'] = APP_INDEX_FILE.'?/Lang/0/'.($bAdmin ? 'en' : $aResult['Language']).'/'.$sStaticCache.'/';
- $aResult['TemplatesLink'] = APP_INDEX_FILE.'?/Templates/0/'.$sStaticCache.'/';
+ $aResult['TemplatesLink'] = APP_INDEX_FILE.'?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
$aResult['PluginsLink'] = $sPluginsLink;
$aResult['EditorDefaultType'] = 'Html' === $aResult['EditorDefaultType'] ? 'Html' : 'Plain';
@@ -6079,7 +6079,10 @@ class Actions
{
$oConfig = $this->Config();
- $aResult = array(\RainLoop\Enumerations\Capa::PREM);
+ $aResult = array(
+ \RainLoop\Enumerations\Capa::PREM,
+ \RainLoop\Enumerations\Capa::FILTERS
+ );
if ($oConfig->Get('webmail', 'allow_additional_accounts', false))
{
diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php
index b252c988f..7982a1585 100644
--- a/rainloop/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php
+++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php
@@ -1,15 +1,16 @@
-oHttp = $oHttp;
$this->oActions = $oActions;
$this->aPaths = array();
+ $this->sQuery = '';
}
/**
@@ -449,16 +455,18 @@ class ServiceActions
$this->oActions->verifyCacheByKey($this->sQuery);
}
+ $bAdmin = false !== \strpos($this->sQuery, 'Admin');
+
$sCacheFileName = '';
if ($bCacheEnabled)
{
- $sCacheFileName = 'TEMPLATES:'.$this->oActions->Plugins()->Hash().APP_VERSION;
+ $sCacheFileName = 'TEMPLATES:'.($bAdmin ? 'Admin/' : 'App/').$this->oActions->Plugins()->Hash().APP_VERSION;
$sResult = $this->Cacher()->Get($sCacheFileName);
}
if (0 === \strlen($sResult))
{
- $sResult = $this->compileTemplates(false);
+ $sResult = $this->compileTemplates($bAdmin);
if ($bCacheEnabled && 0 < \strlen($sCacheFileName))
{
$this->Cacher()->Set($sCacheFileName, $sResult);
@@ -1021,20 +1029,16 @@ class ServiceActions
/**
* @param bool $bAdmin = false
- * @param bool $bWrapByScriptTag = true
*
* @return string
*/
- private function compileTemplates($bAdmin = false, $bWrapByScriptTag = false)
+ private function compileTemplates($bAdmin = false)
{
- $sHtml = \RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views', $this->oActions).
+ $sHtml = \RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views/'.($bAdmin ? 'Admin' : 'App'), $this->oActions).
+ \RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views/Common', $this->oActions).
$this->oActions->Plugins()->CompileTemplate($bAdmin);
- return
- ($bWrapByScriptTag ? '' : '')
- ;
+ return 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml)).';';
}
/**
diff --git a/rainloop/v/0.0.0/app/templates/Index.html b/rainloop/v/0.0.0/app/templates/Index.html
index 49738f558..2663a0e53 100644
--- a/rainloop/v/0.0.0/app/templates/Index.html
+++ b/rainloop/v/0.0.0/app/templates/Index.html
@@ -11,7 +11,7 @@
-