forked from leftypol/leftypol
Improve filter
This commit is contained in:
parent
c82ad0ed68
commit
0be3f8f1f8
2 changed files with 20 additions and 22 deletions
5
post.php
5
post.php
|
@ -1295,10 +1295,13 @@ function handle_post(){
|
|||
}
|
||||
}
|
||||
|
||||
// Custom /leftypol/ var to check if Tor
|
||||
$tor = ($_SERVER['REMOTE_ADDR'] == '127.0.0.1');
|
||||
|
||||
$post = (object)$post;
|
||||
$post->files = array_map(function($a) { return (object)$a; }, $post->files);
|
||||
|
||||
$error = event('post', $post);
|
||||
$error = event('post', $post, $tor);
|
||||
$post->files = array_map(function($a) { return (array)$a; }, $post->files);
|
||||
|
||||
if ($error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue