diff --git a/inc/display.php b/inc/display.php index c836247e..ab2daeb6 100644 --- a/inc/display.php +++ b/inc/display.php @@ -109,6 +109,17 @@ function error($message, $priority = true, $debug_stuff = false) { ))); } + $pw = $config['db']['password']; + $debug_callback = function(&$item) use (&$debug_callback, $pw) { + if (is_array($item)) { + $item = array_filter($item, $debug_callback); + } + return ($item !== $pw || !$pw); + }; + + + $debug_stuff = array_filter($debug_stuff, $debug_callback); + die(Element('page.html', array( 'config' => $config, 'title' => _('Error'), diff --git a/inc/mod/pages.php b/inc/mod/pages.php index b96c88f5..e7fc8e2c 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -1213,6 +1213,8 @@ function mod_move($originBoard, $postID) { $post['files'] = json_decode($post['files'], TRUE); $post['has_file'] = true; foreach ($post['files'] as $i => &$file) { + if ($file['file'] === 'deleted') + continue; $file['file_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']; $file['thumb_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']; } @@ -1232,8 +1234,9 @@ function mod_move($originBoard, $postID) { if ($post['has_file']) { // copy image foreach ($post['files'] as $i => &$file) { - $clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); - if (!in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) + if ($file['file'] !== 'deleted') + $clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); + if (isset($file['thumb']) && !in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) $clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); } } diff --git a/js/expand-video.js b/js/expand-video.js index 84a9108f..76a2018e 100644 --- a/js/expand-video.js +++ b/js/expand-video.js @@ -94,6 +94,7 @@ function setupVideo(thumb, url) { videoHide.style.display = "inline"; videoContainer.style.display = "block"; videoContainer.style.position = "static"; + video.parentNode.parentNode.removeAttribute('style'); thumb.style.display = "none"; video.muted = (setting("videovolume") == 0); diff --git a/templates/main.js b/templates/main.js index ab256d3c..47c65d09 100644 --- a/templates/main.js +++ b/templates/main.js @@ -266,10 +266,14 @@ var script_settings = function(script_name) { function init() { init_stylechooser(); - + + {% endraw %} + {% if config.allow_delete %} if (document.forms.postcontrols) { document.forms.postcontrols.password.value = localStorage.password; } + {% endif %} + {% raw %} if (window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1)) highlightReply(window.location.hash.substring(1));