From decbda3e23e9dae793a12322ba48d3e4a9898c07 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 9 Jan 2017 23:26:31 +0100
Subject: [PATCH] Fix inversion application name - company name

---
 htdocs/core/class/notify.class.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index b30bba8c075..b4d713b7b7a 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -294,8 +294,8 @@ class Notify
 		//$urlwithroot=DOL_MAIN_URL_ROOT;						// This is to use same domain name than current
 
 		// Define some vars
-	    $application = $mysoc->name;
-	    //if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $application = $conf->global->MAIN_APPLICATION_TITLE;
+	    $application = 'Dolibarr';
+	    if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $application = $conf->global->MAIN_APPLICATION_TITLE;
 	    $replyto = $conf->notification->email_from;
 	    $filename = basename($file);
         $mimefile = dol_mimetype($file);
@@ -356,7 +356,7 @@ class Notify
 	                		$outputlangs->setDefaultLang($obj->default_lang);
 	                	}
 
-	                	$subject = '['.$application.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification");
+	                	$subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification");
 	                	
 	                    switch ($notifcode) {
 							case 'BILL_VALIDATE':
@@ -524,7 +524,7 @@ class Notify
 		        $link = '';
 		        $num++;
 
-		        $subject = '['.$application.'] '.$langs->transnoentitiesnoconv("DolibarrNotification");
+		        $subject = '['.$mysoc->name.'] '.$langs->transnoentitiesnoconv("DolibarrNotification");
 
 		        switch ($notifcode) {
 					case 'BILL_VALIDATE':
-- 
GitLab