mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
add method getFilesize()
This commit is contained in:
parent
528e911535
commit
31d02f8114
|
@ -282,6 +282,21 @@ class SeedDMS_Preview_Previewer {
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
public function getFilesize($object, $width=0) { /* {{{ */
|
||||
if($width == 0)
|
||||
$width = $this->width;
|
||||
else
|
||||
$width = intval($width);
|
||||
$target = $this->getFileName($object, $width);
|
||||
if($target && file_exists($target.'.png')) {
|
||||
return(filesize($target.'.png'));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
} /* }}} */
|
||||
|
||||
|
||||
public function deletePreview($document, $object, $width=0) { /* {{{ */
|
||||
if($width == 0)
|
||||
$width = $this->width;
|
||||
|
|
Loading…
Reference in New Issue
Block a user