From 35da301d31045b0974100307a7f0f4128b482170 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 18 Sep 2016 11:59:11 -0400 Subject: Move function User::rmHeadImage() to Object class --- app/class/object.class.php | 11 +++++++++++ app/class/user.class.php | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/class/object.class.php b/app/class/object.class.php index 1a01ada..7c0b7bb 100644 --- a/app/class/object.class.php +++ b/app/class/object.class.php @@ -609,6 +609,17 @@ abstract class Object extends Framework { return $this->ar() . "/file.php?d=img/heads&f=" . $this->guid; } + + /* + * Remove this object's head image + */ + function rmHeadImage() + { + if (!is_file("assets/img/heads/" . $this->guid)) + return true; + + return unlink("assets/img/heads/" . $this->guid); + } } /* diff --git a/app/class/user.class.php b/app/class/user.class.php index 44b4b5f..b8143a9 100644 --- a/app/class/user.class.php +++ b/app/class/user.class.php @@ -213,17 +213,6 @@ class User extends Object return "glyphicon glyphicon-user"; } - /* - * Remove this user's head image - */ - function rmHeadImage() - { - if (!is_file("assets/img/heads/" . $this->guid)) - return true; - - return unlink("assets/img/heads/" . $this->guid); - } - /* * Get all groups this user owns or is a member of */ -- cgit v1.2.3