Determine current filename

This commit is contained in:
Deon George
2020-07-16 12:12:26 +10:00
parent ed49ef29b5
commit 18812b51e0
2 changed files with 14 additions and 4 deletions

View File

@@ -251,6 +251,16 @@ abstract class Catalog extends Model
return (($short OR preg_match('/^\//',$file)) ? '' : config($this->type.'.dir').DIRECTORY_SEPARATOR).$file;
}
/**
* Return the current filename
*
* @return string
*/
public function file_name_current(bool $short=TRUE): string
{
return (($short OR preg_match('/^\//',$this->filename)) ? '' : config($this->type.'.dir').DIRECTORY_SEPARATOR).$this->filename;
}
/**
* Determine the new name for the image
* @deprecated use $this->file_name()