summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-10-24 13:24:33 +0200
committerczaks <marcin@6irc.net>2014-10-24 13:24:33 +0200
commitdaad519b85463ce21600af22adae8207517f35c5 (patch)
tree0044666e9d0ea5bed9d9f09cd9199da12a259311
parentf16c14640ea7103c85a8823591594980004b1d5d (diff)
config[php_md5] feature
-rw-r--r--inc/config.php3
-rw-r--r--post.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/inc/config.php b/inc/config.php
index bd5c5db3..016b7f77 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -780,6 +780,9 @@
// Set this to true if you're using a BSD
$config['bsd_md5'] = false;
+ // Set this to true if you're having problems with image duplicated error and bsd_md5 doesn't help.
+ $config['php_md5'] = false;
+
// Number of posts in a "View Last X Posts" page
$config['noko50_count'] = 50;
// Number of posts a thread needs before it gets a "View Last X Posts" page.
diff --git a/post.php b/post.php
index 223ddd45..21929bfa 100644
--- a/post.php
+++ b/post.php
@@ -568,7 +568,7 @@ if (isset($_POST['delete'])) {
$md5cmd = $config['bsd_md5'] ? 'md5 -r' : 'md5sum';
- if ($output = shell_exec_error("cat $filenames | $md5cmd")) {
+ if (!$config['php_md5'] && $output = shell_exec_error("cat $filenames | $md5cmd")) {
$explodedvar = explode(' ', $output);
$hash = $explodedvar[0];
$post['filehash'] = $hash;