Update notify.class.php

This commit is contained in:
Laurent Destailleur 2018-10-04 19:30:03 +02:00 committed by GitHub
parent c22b80831d
commit 2232bd3944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,13 +369,14 @@ class Notify
if ($result)
{
$num = $this->db->num_rows($result);
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$projtitle='';
if (! empty($object->fk_project))
{
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$proj = new Project($this->db);
$proj->fetch($object->fk_project);
$projtitle='('.$proj->title.')';
}
$projtitle=(empty($proj->title)?'':'['.$proj->title.']');
if ($num > 0)
{
@ -397,7 +398,7 @@ class Notify
$outputlangs->setDefaultLang($obj->default_lang);
}
$subject = '['.$mysoc->name.']'.$projtitle.' '.$outputlangs->transnoentitiesnoconv("DolibarrNotification");
$subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification").($projtitle?' '.$projtitle:'');
switch ($notifcode) {
case 'BILL_VALIDATE':