fix possible problem on merge_print with addressbook email-templates

This commit is contained in:
Klaus Leithoff 2013-01-18 08:20:35 +00:00
parent 77c94dd070
commit c7bf681e47
2 changed files with 10 additions and 2 deletions

View File

@ -174,11 +174,18 @@ class felamimail_bo
public static function getInstance($_restoreSession=true, $_profileID=0, $_validate=true)
{
if ($_profileID == 0)
{
if (isset($GLOBALS['egw_info']['user']['preferences']['felamimail']['ActiveProfileID']))
{
$profileID = (int)$GLOBALS['egw_info']['user']['preferences']['felamimail']['ActiveProfileID'];
}
else
{
$profileID = emailadmin_bo::getUserDefaultProfileID();
}
if ($profileID!=$_profileID) $_restoreSession==false;
$_profileID=$profileID;
if (self::$debug) error_log(__METHOD__.__LINE__.' called with profileID==0 using '.$profileID.' instead->'.function_backtrace());
if (self::$debug); error_log(__METHOD__.__LINE__.' called with profileID==0 using '.$profileID.' instead->'.function_backtrace());
}
if ($_profileID != 0 && $_validate)
{

View File

@ -345,6 +345,7 @@
$sessionData['to'] = base64_decode($_REQUEST['send_to']);
// first check if there is a questionmark or ampersand
if (strpos($sessionData['to'],'?')!== false) list($sessionData['to'],$rest) = explode('?',$sessionData['to'],2);
$sessionData['to'] = html_entity_decode($sessionData['to']);
if (($at_pos = strpos($sessionData['to'],'@')) !== false)
{
if (($amp_pos = strpos(substr($sessionData['to'],$at_pos),'&')) !== false)