PHP8: Fix posting
This commit is contained in:
parent
4162d94f15
commit
1302dcab74
|
@ -71,9 +71,15 @@ stylesheets/fonts
|
|||
#Images from twemoji
|
||||
js/twemoji/16x16/
|
||||
|
||||
<<<<<<< HEAD
|
||||
# JUNK
|
||||
GET/
|
||||
.bash_history
|
||||
.cache/
|
||||
777/
|
||||
R9K/
|
||||
WRK/
|
||||
a/
|
||||
alt/
|
||||
anime/
|
||||
b/
|
||||
b_anime/
|
||||
|
@ -106,3 +112,4 @@ save_ass_thread/
|
|||
sfw/
|
||||
tech/
|
||||
ref/
|
||||
ga/
|
||||
|
|
21
post.php
21
post.php
|
@ -7,17 +7,6 @@ require_once 'inc/functions.php';
|
|||
require_once 'inc/anti-bot.php';
|
||||
require_once 'inc/bans.php';
|
||||
|
||||
// Fix for magic quotes
|
||||
if (get_magic_quotes_gpc()) {
|
||||
function strip_array($var) {
|
||||
return is_array($var) ? array_map('strip_array', $var) : stripslashes($var);
|
||||
}
|
||||
|
||||
$_GET = strip_array($_GET);
|
||||
$_POST = strip_array($_POST);
|
||||
}
|
||||
|
||||
|
||||
$dropped_post = false;
|
||||
|
||||
function handle_nntpchan() {
|
||||
|
@ -1411,8 +1400,16 @@ function handle_post(){
|
|||
$js = (object) array();
|
||||
// Tell it to delete the cached post for referer
|
||||
$js->{$_SERVER['HTTP_REFERER']} = true;
|
||||
|
||||
// Encode and set cookie
|
||||
setcookie($config['cookies']['js'], json_encode($js), 0, $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, false, false);
|
||||
setcookie(
|
||||
$config['cookies']['js'],
|
||||
json_encode($js),
|
||||
0,
|
||||
$config['cookies']['jail'] ? $config['cookies']['path'] : '/',
|
||||
'',
|
||||
false,
|
||||
false);
|
||||
}
|
||||
|
||||
$root = $post['mod'] ? $config['root'] . $config['file_mod'] . '?/' : $config['root'];
|
||||
|
|
Loading…
Reference in New Issue