diff options
Diffstat (limited to 'app/class/obj.class.php')
-rw-r--r-- | app/class/obj.class.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/class/obj.class.php b/app/class/obj.class.php index 003738b..199529b 100644 --- a/app/class/obj.class.php +++ b/app/class/obj.class.php @@ -231,14 +231,13 @@ class obj extends table /* * Set the head image for this object, overwriting any existing - * image. $image should be an uploaded file to PHP, still - * unhandled. + * image. $image should be the name of the file formctrl field. */ - public function setHeadImg(array $image) : bool + public function setHeadImg(string $image) : bool { $path = "dynmic/heads/" . $this->guid; - if (!saveFile($image, $path, self::HEAD_MAXSIZE, self::IMAGE_MIME)) + if (!saveIfFile($image, $path, self::HEAD_MAXSIZE, self::IMAGE_MIME)) return false; if (!imageSquareCrop($path)) @@ -276,13 +275,13 @@ class obj extends table /* * Set the background image for this object, overwriting any - * existing image. $image should be an uploaded file to PHP, - * still unhandled. + * existing image. $image should be the name of the file + * formctrl field. */ - public function setBgImg(array $image) : bool + public function setBgImg(string $image) : bool { $path = "dynmic/bgs/" . $this->guid; - return saveFile($image, $path, self::BG_MAXSIZE, self::IMAGE_MIME); + return saveIfFile($image, $path, self::BG_MAXSIZE, self::IMAGE_MIME); } /* |