summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-04-19 21:47:52 -0400
committerMalf Furious <m@lfurio.us>2017-04-19 21:47:52 -0400
commitae94f42a59c1f308d973dc91214a63a1afb6cae3 (patch)
treea78852e2e1457771c8c4061a1492517812afe5fb
parenta6a828521c61ebed3ec7038b2a53c002312a8bd0 (diff)
downloadscrott-ae94f42a59c1f308d973dc91214a63a1afb6cae3.tar.gz
scrott-ae94f42a59c1f308d973dc91214a63a1afb6cae3.zip
Add object function rmHeadImg()
-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 0dacd87..55d0874 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -181,6 +181,18 @@ class object extends table
return true;
}
+
+ /*
+ * Remove the head image for this object. This deletes the image
+ * on disk.
+ */
+ public function rmHeadImg() : bool
+ {
+ if (!is_file("dynmic/heads/" . $this->guid))
+ return true;
+
+ return unlink("dynmic/heads/" . $this->guid);
+ }
}
?>