summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/class/object.class.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/class/object.class.php b/app/class/object.class.php
index f8f5460..3bf64ec 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -213,6 +213,18 @@ class object extends table
$path = "dynmic/bgs/" . $this->guid;
return saveFile($image, $path, self::BG_MAXSIZE, self::IMAGE_MIME);
}
+
+ /*
+ * Remove the background image for this object. This deletes
+ * the image on disk.
+ */
+ public function rmBgImg() : bool
+ {
+ if (!is_file("dynmic/bgs/" . $this->guid))
+ return true;
+
+ return unlink("dynmic/bgs/" . $this->guid);
+ }
}
?>