mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
$width passed to getFileName() is optional
This commit is contained in:
parent
99569a3435
commit
6f9ec7cdc3
|
@ -52,10 +52,15 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
* @param integer $width width of preview image
|
* @param integer $width width of preview image
|
||||||
* @return string file name of preview image
|
* @return string file name of preview image
|
||||||
*/
|
*/
|
||||||
public function getFileName($object, $width) { /* {{{ */
|
public function getFileName($object, $width=0) { /* {{{ */
|
||||||
if(!$object)
|
if(!$object)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if($width == 0)
|
||||||
|
$width = $this->width;
|
||||||
|
else
|
||||||
|
$width = intval($width);
|
||||||
|
|
||||||
$document = $object->getDocument();
|
$document = $object->getDocument();
|
||||||
$dms = $document->_dms;
|
$dms = $document->_dms;
|
||||||
$dir = $this->previewDir.'/'.$document->getDir();
|
$dir = $this->previewDir.'/'.$document->getDir();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user