Skip to content

Commit

Permalink
Fix filesystem and reference collision
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoakes committed Jan 22, 2017
1 parent 1694057 commit 5fc0547
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Mgate/PubliBundle/Controller/TraitementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ private function publipostage($templateName, $rootName, $rootObject_id, $debug =
}

if ($rootName == 'etude' && $rootObject->getReference()) {
$refDocx = $rootObject->getReference().'-'.$templateName.'-';
if(!$debug) {//avoid collision with references using / or other characters.
$refDocx = $rootObject->getReference() . '-' . $templateName . '-';
}
else{
$refDocx = '';
}
} elseif ($rootName == 'etudiant') {
$refDocx = $templateName.'-'.$rootObject->getIdentifiant();
} else {
Expand Down

0 comments on commit 5fc0547

Please sign in to comment.