summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorIan Bradley <marlen.crabapple@gmail.com>2014-09-15 16:33:37 -0700
committerIan Bradley <marlen.crabapple@gmail.com>2014-09-15 16:33:37 -0700
commitc1ecef377229da3b6af65834109c8fc76508479c (patch)
tree0f994a7b14eb393abda62f16b8d2dd7768e13e58 /post.php
parent39cecea5795fd827432593c81e54f2bf181d02ce (diff)
Added support for BSD md5 incase md5sum isn't available.
Diffstat (limited to 'post.php')
-rw-r--r--post.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/post.php b/post.php
index d6dfdaa1..033e5ab5 100644
--- a/post.php
+++ b/post.php
@@ -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']);
}
}
-