diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-15 14:03:27 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-15 14:03:27 +1000 |
| commit | 00833eeafd6e0f71390504ac10ddf86bbaceb39f (patch) | |
| tree | 2ca84516f2b7d44efe88b9aa2e609bef0dd32fd7 /post.php | |
| parent | fd5300a49e67f9401b821404a146b338bc21dd8a (diff) | |
js/ajax.js: post with ajax
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -743,7 +743,15 @@ if (isset($_POST['delete'])) { else rebuildThemes('post', $board['uri']); - header('Location: ' . $redirect, true, $config['redirect_http']); + if (!isset($_POST['json_response'])) { + header('Location: ' . $redirect, true, $config['redirect_http']); + } else { + header('Content-Type: text/json; charset=utf-8'); + echo json_encode(array( + 'redirect' => $redirect, + 'id' => $id + )); + } } else { if (!file_exists($config['has_installed'])) { header('Location: install.php', true, $config['redirect_http']); |
