mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-20 20:51:50 +01:00
Improve ?/reports API
This commit is contained in:
parent
43af0db4e7
commit
cd1c1730e4
@ -2566,11 +2566,25 @@ function mod_reports() {
|
||||
}
|
||||
|
||||
if ( $reportCount > 0 && $json ) {
|
||||
array_walk($reports, function(&$v, $k, $global) {
|
||||
array_walk($reports, function(&$v, $k, $ud) {
|
||||
$global = $ud['global'];
|
||||
$report_posts = $ud['report_posts'];
|
||||
|
||||
$board = ($v['board'] ? $v['board'] : NULL);
|
||||
|
||||
if (isset($v['ip']) && !$global) {
|
||||
$v['ip'] = less_ip($v['ip'], ($v['board']?$v['board']:''));
|
||||
$v['ip'] = less_ip($v['ip'], ($board?$board:''));
|
||||
}
|
||||
}, $global);
|
||||
|
||||
if (isset($report_posts[ $v['board'] ][ $v['post'] ])) {
|
||||
$post_content = $report_posts[ $v['board'] ][ $v['post'] ];
|
||||
unset($post_content['password']);
|
||||
if (!$global) {
|
||||
$post_content['ip'] = less_ip($post_content['ip'], ($board?$board:''));
|
||||
}
|
||||
$v['post_content'] = $post_content;
|
||||
}
|
||||
}, array('global' => $global, 'report_posts' => $report_posts));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user