diff options
| author | Malf Furious <m@lfurio.us> | 2017-04-19 21:47:52 -0400 |
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2017-04-19 21:47:52 -0400 |
| commit | ae94f42a59c1f308d973dc91214a63a1afb6cae3 (patch) | |
| tree | a78852e2e1457771c8c4061a1492517812afe5fb | |
| parent | a6a828521c61ebed3ec7038b2a53c002312a8bd0 (diff) | |
| download | scrott-ae94f42a59c1f308d973dc91214a63a1afb6cae3.tar.gz scrott-ae94f42a59c1f308d973dc91214a63a1afb6cae3.zip | |
Add object function rmHeadImg()
Diffstat (limited to '')
| -rw-r--r-- | app/class/object.class.php | 12 |
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); + } } ?> |
