diff options
Diffstat (limited to 'app/class/event.php')
-rw-r--r-- | app/class/event.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/class/event.php b/app/class/event.php index a23fff9..9fc75d2 100644 --- a/app/class/event.php +++ b/app/class/event.php @@ -8,6 +8,7 @@ class Event extends Dbitem protected $user; protected $target; protected $message; + protected $clap = 0; const EVENT_TYPES = ['message', 'art_add', 'art_edit', 'art_delete', 'media_add', 'media_delete', 'font_add']; const EVENT_BASE = ['message']; @@ -29,9 +30,16 @@ class Event extends Dbitem $this->user = idclean($this->user); if (in_array($this->type, self::EVENT_ART)) { $this->target = idclean($this->target); + } elseif ($this->type === 'message') { + $this->message = htmlspecialchars($this->message); } } + public function addclap() + { + $this->clap ++; + } + // _____________________ G E T __________________________ public function id() @@ -78,6 +86,11 @@ class Event extends Dbitem return $this->message; } + public function clap() + { + return $this->clap; + } + // ________________________ S E T ____________________ @@ -126,6 +139,13 @@ class Event extends Dbitem } } + public function setclap($clap) + { + if(is_int($clap)) { + $this->clap = $clap; + } + } + |