summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 3bf64ec..7c80b5b 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -204,6 +204,18 @@ class object extends table
}
/*
+ * Get the URL to the background image resource for this
+ * object. If no image is set, NULL is returned.
+ */
+ public function getBgImg() : ?string
+ {
+ if (!is_file("dynmic/bgs/" . $this->guid))
+ return NULL;
+
+ return ar() . "/df.php?d=bgs&f=" . $this->guid;
+ }
+
+ /*
* Set the background image for this object, overwriting any
* existing image. $image should be an uploaded file to PHP,
* still unhandled.