diff --git a/404.php b/404.php
index a9a29c36..0e1b634f 100644
--- a/404.php
+++ b/404.php
@@ -35,7 +35,7 @@ $page = <<There isn't one yet and there will never be an official archive.
How do I donate?
-Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin). PayPal is also accepted @ fredrick.brennan1@gmail.com .
+Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin).
You may also donate monthly via Patreon at http://www.patreon.com/user?u=162165.
Are you really a cripple?
diff --git a/inc/functions.php b/inc/functions.php
index 3504cc38..2ffdc222 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1091,9 +1091,9 @@ function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) {
if (!$post['thread']) {
// Delete thread HTML page
- file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $post['id']));
- file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page50'], $post['id']));
- file_unlink($board['dir'] . $config['dir']['res'] . sprintf('%d.json', $post['id']));
+ @file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $post['id']));
+ @file_unlink($board['dir'] . $config['dir']['res'] . sprintf($config['file_page50'], $post['id']));
+ @file_unlink($board['dir'] . $config['dir']['res'] . sprintf('%d.json', $post['id']));
$antispam_query = prepare('DELETE FROM ``antispam`` WHERE `board` = :board AND `thread` = :thread');
$antispam_query->bindValue(':board', $board['uri']);
@@ -1106,9 +1106,9 @@ function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) {
if ($post['files']) {
// Delete file
foreach (json_decode($post['files']) as $i => $f) {
- if ($f->file !== 'deleted') {
- file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . $f->file);
- file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'] . $f->thumb);
+ if (isset($f->file, $f->thumb) && $f->file !== 'deleted') {
+ @file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . $f->file);
+ @file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'] . $f->thumb);
}
}
}
diff --git a/inc/instance-config.php b/inc/instance-config.php
index d888b71f..aa45f960 100644
--- a/inc/instance-config.php
+++ b/inc/instance-config.php
@@ -135,6 +135,7 @@
$config['additional_javascript'][] = 'js/youtube.js';
$config['additional_javascript'][] = 'js/comment-toolbar.js';
$config['additional_javascript'][] = 'js/catalog-search.js';
+ $config['additional_javascript'][] = 'js/thread-stats.js';
//$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css';
diff --git a/js/thread-stats.js b/js/thread-stats.js
index 59fed912..4050fb67 100644
--- a/js/thread-stats.js
+++ b/js/thread-stats.js
@@ -8,8 +8,9 @@
* $config['additional_javascript'][] = 'js/thread-stats.js';
*/
if (active_page == 'thread') {
+$(document).ready(function(){
//check if page uses unique ID
- var IDsupport = ($('.poster_id').length > 0);
+ var IDsupport = ($('.poster_id').length > 0);
var thread_id = (document.location.pathname + document.location.search).split('/');
thread_id = thread_id[thread_id.length -1].split('+')[0].split('.')[0];
@@ -100,10 +101,9 @@ if (active_page == 'thread') {
if (!found) $('#thread_stats_page').css('color','red');
});
},30000);
- $(document).ready(function(){
$('body').append('');
update_thread_stats();
$('#update_thread').click(update_thread_stats);
$(document).on('new_post',update_thread_stats);
- });
-}
\ No newline at end of file
+});
+}
diff --git a/post.php b/post.php
index 881c7e01..650b431b 100644
--- a/post.php
+++ b/post.php
@@ -232,15 +232,16 @@ elseif (isset($_POST['post'])) {
}
}
- if (!(($post['op'] && $_POST['post'] == $config['button_newtopic']) ||
- (!$post['op'] && $_POST['post'] == $config['button_reply'])))
+ //if (!(($post['op'] && $_POST['post'] == $config['button_newtopic']) ||
+ //(!$post['op'] && $_POST['post'] == $config['button_reply'])))
//error($config['error']['bot']);
// Check the referrer
if ($config['referer_match'] !== false &&
- (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER']))))
+ (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER'])))) {
error($config['error']['referer']);
-
+ }
+
checkDNSBL();
// Check if banned