forked from leftypol/leftypol
Added support for BSD md5 incase md5sum isn't available.
This commit is contained in:
parent
39cecea579
commit
c1ecef3772
2 changed files with 18 additions and 2 deletions
5
post.php
5
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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue