From c1ecef377229da3b6af65834109c8fc76508479c Mon Sep 17 00:00:00 2001 From: Ian Bradley Date: Mon, 15 Sep 2014 16:33:37 -0700 Subject: Added support for BSD md5 incase md5sum isn't available. --- post.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'post.php') 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']); } } - -- cgit v1.3