config[php_md5] feature

This commit is contained in:
czaks 2014-10-24 13:24:33 +02:00
parent f16c14640e
commit daad519b85
2 changed files with 4 additions and 1 deletions

View File

@ -780,6 +780,9 @@
// Set this to true if you're using a BSD // Set this to true if you're using a BSD
$config['bsd_md5'] = false; $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 // Number of posts in a "View Last X Posts" page
$config['noko50_count'] = 50; $config['noko50_count'] = 50;
// Number of posts a thread needs before it gets a "View Last X Posts" page. // Number of posts a thread needs before it gets a "View Last X Posts" page.

View File

@ -568,7 +568,7 @@ if (isset($_POST['delete'])) {
$md5cmd = $config['bsd_md5'] ? 'md5 -r' : 'md5sum'; $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); $explodedvar = explode(' ', $output);
$hash = $explodedvar[0]; $hash = $explodedvar[0];
$post['filehash'] = $hash; $post['filehash'] = $hash;