1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-26 06:58:26 +01:00
This commit is contained in:
8chan 2015-09-24 20:26:42 +00:00
commit f9a7bac6f0

View File

@ -103,7 +103,14 @@ class Api {
$fields = $threadsPage ? $this->threadsPageFields : $this->postFields;
$this->translateFields($fields, $post, $apiPost);
if ($this->config['poster_ids']) $apiPost['id'] = poster_id($post->ip, $post->thread, $board['uri']);
if ($this->config['poster_ids']) {
if ($post->thread) {
$apiPost['id'] = poster_id($post->ip, $post->thread, $board['uri']);
} else {
$apiPost['id'] = poster_id($post->ip, $post->id, $board['uri']);
}
}
if ($threadsPage) return $apiPost;
// Handle country field