summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2019-03-21 23:50:40 -0400
committerMalf Furious <m@lfurio.us>2019-03-21 23:50:40 -0400
commit098720c46e351ab41295ad451b8d70e7f794ee4d (patch)
tree12c9b3b6e9c899a9b373b77423bdf98051ec8e18 /app
parent0ef6ebdc441d0e840ea5002100c1d98339d2d840 (diff)
downloadscrott-098720c46e351ab41295ad451b8d70e7f794ee4d.tar.gz
scrott-098720c46e351ab41295ad451b8d70e7f794ee4d.zip
Don't remove bg image if it fails to set
This behavior was causing issues in the UI. We normally "try" to set a new asset by default, in case one was provided by the user, and just soft-fail if one wasn't. This "soft-failing" is now resulting in the images being removed if the user just goes in to change his alias (for example). Signed-off-by: Malf Furious <m@lfurio.us>
Diffstat (limited to 'app')
-rw-r--r--app/class/obj.class.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/class/obj.class.php b/app/class/obj.class.php
index 9d3ac9a..bd546b2 100644
--- a/app/class/obj.class.php
+++ b/app/class/obj.class.php
@@ -298,21 +298,17 @@ class obj extends table
/* bgs image */
$bgs = "dynmic/bgs/" . $this->guid;
if (!saveIfFile($image, $bgs, self::BG_MAXSIZE, self::IMAGE_MIME))
- goto fail;
+ return false;
/* thumbs image */
$thumbs = "dynmic/thumbs/" . $this->guid;
if (!copy($bgs, $thumbs))
- goto fail;
+ return false;
if (!imageSquareCrop($thumbs))
- goto fail;
+ return false;
return true;
-
-fail:
- $this->rmBgImg();
- return false;
}
/*