make valid filenames
Dieser Commit ist enthalten in:
Ursprung
a6e09a7f95
Commit
471d78986f
@ -199,10 +199,18 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
||||
{
|
||||
// forced filename from setFilename()
|
||||
if ($this->filename) {
|
||||
return $this->addFilenameExtension($this->filename);
|
||||
return $this->addFilenameExtension(
|
||||
$this->makeValidFileName(
|
||||
$this->filename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $this->addFilenameExtension($this->getTypeForFilename());
|
||||
return $this->addFilenameExtension(
|
||||
$this->makeValidFileName(
|
||||
$this->getTypeForFilename()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,19 +69,25 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
|
||||
{
|
||||
// forced filename from setFilename()
|
||||
if ($this->filename) {
|
||||
return $this->addFilenameExtension($this->filename);
|
||||
return $this->addFilenameExtension(
|
||||
$this->makeValidFileName(
|
||||
$this->filename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname'));
|
||||
|
||||
return $this->addFilenameExtension(
|
||||
implode(
|
||||
'_',
|
||||
[
|
||||
$this->getTypeForFilename(),
|
||||
$this->getOrder()->getFieldData('oxordernr'),
|
||||
$sTrimmedBillName
|
||||
]
|
||||
$this->makeValidFileName(
|
||||
implode(
|
||||
'_',
|
||||
[
|
||||
$this->getTypeForFilename(),
|
||||
$this->getOrder()->getFieldData('oxordernr'),
|
||||
$sTrimmedBillName
|
||||
]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -111,10 +111,12 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
|
||||
{
|
||||
$filename = parent::getFilename();
|
||||
|
||||
return str_replace(
|
||||
$filename = str_replace(
|
||||
$this->getOrder()->getFieldData('oxordernr'),
|
||||
$this->getOrder()->getFieldData('oxbillnr'),
|
||||
$filename
|
||||
);
|
||||
|
||||
return $this->makeValidFileName($filename);
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren