diff options
| author | Malf Furious <m@lfurio.us> | 2017-06-04 15:44:13 -0400 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2017-06-04 15:44:13 -0400 | 
| commit | d677fe73839b22fe2065be5a7f6c49a1b11e8c18 (patch) | |
| tree | 4e84831b9f9a73534c8a5f05323a4f84e5d5bf64 | |
| parent | 4ba37714838e1f863c264d6bea7c7de75cd62514 (diff) | |
| download | scrott-d677fe73839b22fe2065be5a7f6c49a1b11e8c18.tar.gz scrott-d677fe73839b22fe2065be5a7f6c49a1b11e8c18.zip | |
Update mesg function setAttachment()
Now saving the original name of the attachment file in the message
object.
Diffstat (limited to '')
| -rw-r--r-- | app/class/mesg.class.php | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php index fd541cd..5d6ba4d 100644 --- a/app/class/mesg.class.php +++ b/app/class/mesg.class.php @@ -247,7 +247,13 @@ class mesg extends object      public function setAttachment(array $file) : bool      {          $path = "dynmic/attach/" . $this->guid; -        return saveFile($file, $path, self::ATTACH_MAXSIZE); +        $origName = ""; + +        $ret = saveFile($file, $path, self::ATTACH_MAXSIZE, NULL, $origName); +        $this->attachment = $origName; +        $this->saveObj(); + +        return $ret;      }  } | 
