Skip to content

Commit 5fc0547

Browse files
committed
Fix filesystem and reference collision
1 parent 1694057 commit 5fc0547

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Mgate/PubliBundle/Controller/TraitementController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ private function publipostage($templateName, $rootName, $rootObject_id, $debug =
148148
}
149149

150150
if ($rootName == 'etude' && $rootObject->getReference()) {
151-
$refDocx = $rootObject->getReference().'-'.$templateName.'-';
151+
if(!$debug) {//avoid collision with references using / or other characters.
152+
$refDocx = $rootObject->getReference() . '-' . $templateName . '-';
153+
}
154+
else{
155+
$refDocx = '';
156+
}
152157
} elseif ($rootName == 'etudiant') {
153158
$refDocx = $templateName.'-'.$rootObject->getIdentifiant();
154159
} else {

0 commit comments

Comments
 (0)