diff options
| author | Ian Bradley <marlen.crabapple@gmail.com> | 2014-09-15 16:33:37 -0700 |
|---|---|---|
| committer | Ian Bradley <marlen.crabapple@gmail.com> | 2014-09-15 16:33:37 -0700 |
| commit | c1ecef377229da3b6af65834109c8fc76508479c (patch) | |
| tree | 0f994a7b14eb393abda62f16b8d2dd7768e13e58 /post.php | |
| parent | 39cecea5795fd827432593c81e54f2bf181d02ce (diff) | |
Added support for BSD md5 incase md5sum isn't available.
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -566,7 +566,9 @@ if (isset($_POST['delete'])) { error($config['error']['nomove']); } - if ($output = shell_exec_error("cat $filenames | md5sum")) { + $md5cmd = $config['bsd_md5'] ? 'md5 -r' : 'md5sum'; + + if ($output = shell_exec_error("cat $filenames | $md5cmd")) { $explodedvar = explode(' ', $output); $hash = $explodedvar[0]; $post['filehash'] = $hash; @@ -925,4 +927,3 @@ if (isset($_POST['delete'])) { error($config['error']['nopost']); } } - |
