2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.7' into develop

Conflicts:
	htdocs/compta/bank/virement.php
	htdocs/compta/facture/impayees.php
	htdocs/compta/prelevement/class/bonprelevement.class.php
	htdocs/core/menus/standard/eldy.lib.php
	htdocs/core/modules/modProjet.class.php
	htdocs/install/mysql/migration/3.6.0-3.7.0.sql
	htdocs/langs/en_GB/admin.lang
	htdocs/langs/es_AR/orders.lang
	htdocs/langs/es_AR/trips.lang
	htdocs/langs/es_CO/admin.lang
	htdocs/langs/es_CO/orders.lang
	htdocs/langs/es_CO/trips.lang
	htdocs/langs/fr_FR/admin.lang
	htdocs/langs/fr_FR/main.lang
	htdocs/langs/pl_PL/interventions.lang
	htdocs/langs/pt_BR/trips.lang
	htdocs/langs/ro_RO/productbatch.lang
	htdocs/langs/ro_RO/trips.lang
	htdocs/main.inc.php
	htdocs/projet/element.php
This commit is contained in:
Laurent Destailleur
2015-04-22 17:57:57 +02:00
776 changed files with 10785 additions and 10237 deletions

View File

@@ -40,6 +40,8 @@ if (! isset($argv[1]) || ! $argv[1]) {
exit(-1);
}
$id=$argv[1];
if (! isset($argv[2]) || !empty($argv[2])) $login = $argv[2];
else $login = '';
require_once ($path."../../htdocs/master.inc.php");
require_once (DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
@@ -58,7 +60,9 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
$user = new User($db);
// for signature, we use user send as parameter
if (! empty($login)) $user->fetch('',$login);
// We get list of emailing to process
$sql = "SELECT m.rowid, m.titre, m.sujet, m.body,";
@@ -144,6 +148,8 @@ if ($resql)
$other4=$other[3];
$other5=$other[4];
// Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
$signature = (!empty($user->signature))?$user->signature:'';
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email,
@@ -155,7 +161,7 @@ if ($resql)
'__OTHER3__' => $other3,
'__OTHER4__' => $other4,
'__OTHER5__' => $other5,
'__SIGNATURE__' => '', // Signature is empty when ran from command line (user is a bot)
'__SIGNATURE__' => $signature, // Signature is empty when ran from command line or taken from user in parameter)
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj2->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'
);