1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 23:47:32 +02:00

Show post IP address in meta dropdown. closes #956 closes #657

This commit is contained in:
Davis
2016-05-21 22:02:42 +09:30
committed by Toby Zerner
parent 38c15c5a08
commit 909f52522b
9 changed files with 36 additions and 7 deletions

View File

@@ -47,6 +47,9 @@ class PostSerializer extends PostBasicSerializer
if ($canEdit) {
$attributes['content'] = $post->content;
}
if ($gate->allows('viewPostIps', $post)) {
$attributes['ipAddress'] = $post->ip_address;
}
} else {
$attributes['content'] = $post->content;
}