diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-15 03:59:32 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-15 03:59:32 +0100 |
commit | de195c2fca2f4b77a54be68fb58cd0ccee10a5b7 (patch) | |
tree | a0717b936d4b1474cc766b85578e42d94ad7e512 /app/class/event.php | |
parent | 8130427ec508f1d66553b52052c840c311081061 (diff) | |
download | wcms-de195c2fca2f4b77a54be68fb58cd0ccee10a5b7.tar.gz wcms-de195c2fca2f4b77a54be68fb58cd0ccee10a5b7.zip |
timeline is ok for messaging
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; + } + } + |