1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-01 10:37:18 +01:00
This commit is contained in:
8chan 2014-05-19 19:39:35 +00:00
commit c77526afa6
4 changed files with 22 additions and 3 deletions

View File

@ -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'),

View File

@ -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) {
if ($file['file'] !== 'deleted')
$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 (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']);
}
}

View File

@ -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);

View File

@ -267,9 +267,13 @@ 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));