Fix: wrong var name and multi-line function call not indented correctly

This commit is contained in:
Regis Houssin 2012-04-06 08:34:33 +02:00
parent ca8acdd5f0
commit 533d862470

View File

@ -45,50 +45,50 @@ $object=new Mailing($db);
// Tableau des substitutions possibles // Tableau des substitutions possibles
$substitutionarray=array( $substitutionarray=array(
'__ID__' => 'IdRecord', '__ID__' => 'IdRecord',
'__EMAIL__' => 'EMail', '__EMAIL__' => 'EMail',
'__LASTNAME__' => 'Lastname', '__LASTNAME__' => 'Lastname',
'__FIRSTNAME__' => 'Firstname', '__FIRSTNAME__' => 'Firstname',
'__OTHER1__' => 'Other1', '__OTHER1__' => 'Other1',
'__OTHER2__' => 'Other2', '__OTHER2__' => 'Other2',
'__OTHER3__' => 'Other3', '__OTHER3__' => 'Other3',
'__OTHER4__' => 'Other4', '__OTHER4__' => 'Other4',
'__OTHER5__' => 'Other5', '__OTHER5__' => 'Other5',
'__SIGNATURE__' => 'Signature', '__SIGNATURE__' => 'Signature',
'__PERSONALIZED__' => 'Personalized' '__PERSONALIZED__' => 'Personalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
{ {
$substitutionarray=array_merge( $substitutionarray=array_merge(
$substitutionarray, $substitutionarray,
array( array(
'__CHECK_READ__' => 'CheckMail', '__CHECK_READ__' => 'CheckMail',
'__UNSUSCRIBE__' => 'Unsuscribe' '__UNSUSCRIBE__' => 'Unsuscribe'
) )
); );
} }
$substitutionarrayfortest=array( $substitutionarrayfortest=array(
'__ID__' => 'TESTIdRecord', '__ID__' => 'TESTIdRecord',
'__EMAIL__' => 'TESTEMail', '__EMAIL__' => 'TESTEMail',
'__LASTNAME__' => 'TESTLastname', '__LASTNAME__' => 'TESTLastname',
'__FIRSTNAME__' => 'TESTFirstname', '__FIRSTNAME__' => 'TESTFirstname',
'__OTHER1__' => 'TESTOther1', '__OTHER1__' => 'TESTOther1',
'__OTHER2__' => 'TESTOther2', '__OTHER2__' => 'TESTOther2',
'__OTHER3__' => 'TESTOther3', '__OTHER3__' => 'TESTOther3',
'__OTHER4__' => 'TESTOther4', '__OTHER4__' => 'TESTOther4',
'__OTHER5__' => 'TESTOther5', '__OTHER5__' => 'TESTOther5',
'__SIGNATURE__' => 'TESTSignature', '__SIGNATURE__' => 'TESTSignature',
'__PERSONALIZED__' => 'TESTPersonalized' '__PERSONALIZED__' => 'TESTPersonalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
{ {
$substitutionarray=array_merge( $substitutionarrayfortest=array_merge(
$substitutionarray, $substitutionarrayfortest,
array( array(
'__CHECK_READ__' => 'TESTCheckMail', '__CHECK_READ__' => 'TESTCheckMail',
'__UNSUSCRIBE__' => 'TESTCheckMail' '__UNSUSCRIBE__' => 'TESTCheckMail'
) )
); );
} }
@ -206,17 +206,17 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]); $tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
$tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]); $tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
$substitutionarray=array( $substitutionarray=array(
'__ID__' => $obj->source_id, '__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email, '__EMAIL__' => $obj->email,
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>', '__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>', '__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__LASTNAME__' => $obj->nom, '__LASTNAME__' => $obj->nom,
'__FIRSTNAME__' => $obj->prenom, '__FIRSTNAME__' => $obj->prenom,
'__OTHER1__' => $other1, '__OTHER1__' => $other1,
'__OTHER2__' => $other2, '__OTHER2__' => $other2,
'__OTHER3__' => $other3, '__OTHER3__' => $other3,
'__OTHER4__' => $other4, '__OTHER4__' => $other4,
'__OTHER5__' => $other5 '__OTHER5__' => $other5
); );
$substitutionisok=true; $substitutionisok=true;