forked from Wavyzz/dolibarr
Fix warning
This commit is contained in:
@@ -8252,22 +8252,27 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__ATTENDEE_LASTNAME__'] = isset($object->lastname) ? $object->lastname : '';
|
$substitutionarray['__ATTENDEE_LASTNAME__'] = isset($object->lastname) ? $object->lastname : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_object($object) && $object->element == 'project') {
|
||||||
|
$substitutionarray['__PROJECT_ID__'] = $object->id;
|
||||||
|
$substitutionarray['__PROJECT_REF__'] = $object->ref;
|
||||||
|
$substitutionarray['__PROJECT_NAME__'] = $object->title;
|
||||||
|
} elseif (is_object($object)) {
|
||||||
$project = null;
|
$project = null;
|
||||||
if (is_object($object->project)) {
|
if (!empty($object->project)) {
|
||||||
$project = $object->project;
|
$project = $object->project;
|
||||||
} elseif (is_object($object->projet)) { // Deprecated, for backward compatibility
|
} elseif (!empty($object->projet)) { // Deprecated, for backward compatibility
|
||||||
$project = $object->projet;
|
$project = $object->projet;
|
||||||
}
|
}
|
||||||
if ($project) {
|
if (!is_null($project) && is_object($project)) {
|
||||||
$substitutionarray['__PROJECT_ID__'] = $project->id;
|
$substitutionarray['__PROJECT_ID__'] = $project->id;
|
||||||
$substitutionarray['__PROJECT_REF__'] = $project->ref;
|
$substitutionarray['__PROJECT_REF__'] = $project->ref;
|
||||||
$substitutionarray['__PROJECT_NAME__'] = $project->title;
|
$substitutionarray['__PROJECT_NAME__'] = $project->title;
|
||||||
} else {
|
} else {
|
||||||
// can substitute variables for project : uses lazy load in "make_substitutions" method
|
// can substitute variables for project : uses lazy load in "make_substitutions" method
|
||||||
$project_id = 0;
|
$project_id = 0;
|
||||||
if ($object->fk_project > 0) {
|
if (!empty($object->fk_project) && $object->fk_project > 0) {
|
||||||
$project_id = $object->fk_project;
|
$project_id = $object->fk_project;
|
||||||
} elseif ($object->fk_projet > 0) {
|
} elseif (!empty($object->fk_projet) && $object->fk_projet > 0) {
|
||||||
$project_id = $object->fk_project;
|
$project_id = $object->fk_project;
|
||||||
}
|
}
|
||||||
if ($project_id > 0) {
|
if ($project_id > 0) {
|
||||||
@@ -8277,8 +8282,6 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__PROJECT_NAME__@lazyload'] = '/projet/class/project.class.php:Project:fetchAndSetSubstitution:' . $project_id;
|
$substitutionarray['__PROJECT_NAME__@lazyload'] = '/projet/class/project.class.php:Project:fetchAndSetSubstitution:' . $project_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_object($object) && $object->element == 'project') {
|
|
||||||
$substitutionarray['__PROJECT_NAME__'] = $object->title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($object) && $object->element == 'shipping') {
|
if (is_object($object) && $object->element == 'shipping') {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ ListOfDictionariesEntries=List of dictionaries entries
|
|||||||
ListOfPermissionsDefined=List of defined permissions
|
ListOfPermissionsDefined=List of defined permissions
|
||||||
SeeExamples=See examples here
|
SeeExamples=See examples here
|
||||||
EnabledDesc=Condition to have this field active.<br><br>Examples:<br>1<br>isModEnabled('anothermodule')<br>getDolGlobalString('MYMODULE_OPTION')==2
|
EnabledDesc=Condition to have this field active.<br><br>Examples:<br>1<br>isModEnabled('anothermodule')<br>getDolGlobalString('MYMODULE_OPTION')==2
|
||||||
VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list and view form only (not create, not update).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).
|
VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not on lists), 4=Visible on lists and update/view form only (not create), 5=Visible on list and view form only (not create, not update).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).
|
||||||
ItCanBeAnExpression=It can be an expression. Example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>$user->hasRight('holiday', 'define_holiday')?1:5
|
ItCanBeAnExpression=It can be an expression. Example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>$user->hasRight('holiday', 'define_holiday')?1:5
|
||||||
DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br><strong>For document :</strong><br>0 = not displayed <br>1 = display<br>2 = display only if not empty<br><br><strong>For document lines :</strong><br>0 = not displayed <br>1 = displayed in a column<br>3 = display in line description column after the description<br>4 = display in description column after the description only if not empty
|
DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br><strong>For document :</strong><br>0 = not displayed <br>1 = display<br>2 = display only if not empty<br><br><strong>For document lines :</strong><br>0 = not displayed <br>1 = displayed in a column<br>3 = display in line description column after the description<br>4 = display in description column after the description only if not empty
|
||||||
DisplayOnPdf=On PDF
|
DisplayOnPdf=On PDF
|
||||||
|
|||||||
Reference in New Issue
Block a user