$width passed to getFileName() is optional

This commit is contained in:
Uwe Steinmann 2022-12-07 17:03:11 +01:00
parent 99569a3435
commit 6f9ec7cdc3

View File

@ -52,10 +52,15 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param integer $width width of preview image
* @return string file name of preview image
*/
public function getFileName($object, $width) { /* {{{ */
public function getFileName($object, $width=0) { /* {{{ */
if(!$object)
return false;
if($width == 0)
$width = $this->width;
else
$width = intval($width);
$document = $object->getDocument();
$dms = $document->_dms;
$dir = $this->previewDir.'/'.$document->getDir();