summaryrefslogtreecommitdiff
path: root/inc/mod
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-09 19:40:49 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-08-09 19:40:49 +0000
commit379eb7d553bca9617b9ae08cf2cb7716f438ff7a (patch)
tree3bc856ae777f570891d9868fa963896122afe4fe /inc/mod
parent52df2bd5fd4998455cb0509fbedc095a199458f0 (diff)
Critical bug: could not move threads/posts with spoiler images, resulted in I/O error
Diffstat (limited to 'inc/mod')
-rw-r--r--inc/mod/pages.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 3ab52870..fb759357 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1054,7 +1054,9 @@ function mod_move_reply($originBoard, $postID) {
if ($post['has_file']) {
// move the image
rename($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
- rename($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
+ if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
+ rename($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
+ }
}
buildIndex();
@@ -1146,7 +1148,9 @@ function mod_move($originBoard, $postID) {
if ($post['has_file']) {
// copy image
$clone($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
- $clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
+ if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
+ $clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
+ }
}
// go back to the original board to fetch replies