mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
check if $object is set
This commit is contained in:
parent
5471c17b0f
commit
02307528ba
|
@ -98,6 +98,9 @@ class SeedDMS_Preview_Previewer {
|
|||
* @return string file name of preview image
|
||||
*/
|
||||
protected function getFileName($object, $width) { /* }}} */
|
||||
if(!$object)
|
||||
return false;
|
||||
|
||||
$document = $object->getDocument();
|
||||
$dir = $this->previewDir.'/'.$document->getDir();
|
||||
switch(get_class($object)) {
|
||||
|
@ -173,6 +176,9 @@ class SeedDMS_Preview_Previewer {
|
|||
} /* }}} */
|
||||
|
||||
public function createPreview($object, $width=0) { /* {{{ */
|
||||
if(!$object)
|
||||
return false;
|
||||
|
||||
if($width == 0)
|
||||
$width = $this->width;
|
||||
else
|
||||
|
@ -248,6 +254,9 @@ class SeedDMS_Preview_Previewer {
|
|||
} /* }}} */
|
||||
|
||||
public function hasPreview($object, $width=0) { /* {{{ */
|
||||
if(!$object)
|
||||
return false;
|
||||
|
||||
if($width == 0)
|
||||
$width = $this->width;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user