From 866c16abdce264362edb7f5a3c35e7bab9ddf2a5 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 19 Sep 2018 15:46:26 -0400 Subject: Update all usage of saveFile() Update all usage of saveFile() to use added saveIfFile() function, forwarding on the convenience to model code. Model code can pass in file field names, rather than $_FILES arrays directly. --- app/class/mesg.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/class/mesg.class.php') diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php index 1a864c0..2e5c9d6 100644 --- a/app/class/mesg.class.php +++ b/app/class/mesg.class.php @@ -246,12 +246,12 @@ class mesg extends obj * during new message creation and not changed afterward. Returns * false if there is a problem saving the attachment. */ - public function setAttachment(array $file) : bool + public function setAttachment(string $file) : bool { $path = "dynmic/attach/" . $this->guid; $origName = ""; - $ret = saveFile($file, $path, self::ATTACH_MAXSIZE, NULL, $origName); + $ret = saveIfFile($file, $path, self::ATTACH_MAXSIZE, NULL, $origName); $this->attachment = $origName; $this->saveObj(); -- cgit v1.2.3