Skip to content

Commit

Permalink
[DOC] add: trad ErrorFile
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Sep 23, 2021
1 parent a58fb4b commit cfd03b3
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if ($key == 'photoDefault' || preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if (preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if (preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if (preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down Expand Up @@ -374,8 +374,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
$odfHandler->mergeSegment($listlines);
}
}
}
else {
} else {
$risks = $risk->fetchRisksOrderedByCotation(0, true);
if ($risks > 0 && !empty($risks)) {
for ($i = 1; $i <= 4; $i++ ) {
Expand Down Expand Up @@ -422,6 +421,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
// Call the ODTSubstitutionLine hook
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray, 'line' => $line);
$reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks

foreach ($tmparray as $key => $val) {
try {
if ($val == $tmparray['nomDanger']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if (preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
try {
if (preg_match('/logo$/', $key)) {
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if (preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
if ($key == 'photoDefault' || preg_match('/logo$/', $key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
else $odfHandler->setVars($key, $langs->transnoentities('ErrorFileNotFound'), true, 'UTF-8');
}
else // Text
{
Expand Down
1 change: 1 addition & 0 deletions langs/fr_FR/digiriskdolibarr.lang
Original file line number Diff line number Diff line change
Expand Up @@ -929,3 +929,4 @@ AT = au

ModalAddPhoto = Ajout Photo
SendEmailAt = Envoi de l'email à
ErrorFileNotFound = Aucun logo de la société renseigné

0 comments on commit cfd03b3

Please sign in to comment.