1
0
mirror of https://github.com/flarum/core.git synced 2025-10-16 17:27:05 +02:00

WIP IP Logging

This commit is contained in:
Jan Dorsman
2015-10-24 19:14:15 +02:00
parent 5e2f659f54
commit 49fddbd450
5 changed files with 47 additions and 4 deletions

View File

@@ -45,9 +45,10 @@ class CommentPost extends Post
* @param int $discussionId
* @param string $content
* @param int $userId
* @param string $ipAddress
* @return static
*/
public static function reply($discussionId, $content, $userId)
public static function reply($discussionId, $content, $userId, $ipAddress)
{
$post = new static;
@@ -55,6 +56,7 @@ class CommentPost extends Post
$post->discussion_id = $discussionId;
$post->user_id = $userId;
$post->type = static::$type;
$post->ip_address = $ipAddress;
// Set content last, as the parsing may rely on other post attributes.
$post->content = $content;