Browse Source

Merge pull request #101 from nonmakina/spoilers

Adds spoilers to api
pull/40/head
towards-a-new-leftypol 3 years ago
committed by GitHub
parent
commit
a3844fc8f3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      inc/api.php

3
inc/api.php

@ -93,6 +93,9 @@ class Api {
$dotPos = strrpos($file->file, '.');
$apiPost['ext'] = substr($file->file, $dotPos);
$apiPost['tim'] = substr($file->file, 0, $dotPos);
if (isset ($file->thumb) && $file->thumb) {
$apiPost['spoiler'] = $file->thumb === 'spoiler' ? 1 : 0;
}
if (isset ($file->hash) && $file->hash) {
$apiPost['md5'] = base64_encode(hex2bin($file->hash));
}

Loading…
Cancel
Save