1
0
mirror of https://github.com/torrentpier/torrentpier.git synced 2025-03-12 04:35:42 -07:00

Minor improvements ()

This commit is contained in:
Roman Kelesidis 2023-09-17 16:17:10 +07:00 committed by GitHub
parent a2e7251d38
commit 119cf935a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 9 deletions
admin
install/sql
library
attach_mod
includes
styles/templates/default

@ -155,13 +155,13 @@ if ($search_imagick) {
} elseif (false !== stripos(PHP_OS, "WIN")) {
$path = 'c:/imagemagick/convert.exe';
if (!@file_exists(amod_realpath($path))) {
if (file_exists(amod_realpath($path))) {
$imagick = $path;
}
}
}
if (!@file_exists(amod_realpath(trim($imagick)))) {
if (file_exists(amod_realpath(trim($imagick)))) {
$new_attach['img_imagick'] = trim($imagick);
} else {
$new_attach['img_imagick'] = '';

@ -52,9 +52,9 @@ VALUES ('upload_dir', 'data/torrent_files'),
('img_display_inlined', '1'),
('img_max_width', '200'),
('img_max_height', '200'),
('img_link_width', '0'),
('img_link_height', '0'),
('img_create_thumbnail', '0'),
('img_link_width', '600'),
('img_link_height', '400'),
('img_create_thumbnail', '1'),
('img_min_thumb_filesize', '12000'),
('img_imagick', '/usr/bin/convert'),
('use_gd2', '1'),

@ -278,7 +278,8 @@ function display_attachments($post_id)
'IMG_SRC' => BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'],
'IMG_THUMB_SRC' => $thumb_source,
'FILESIZE' => $filesize,
'COMMENT' => $comment
'COMMENT' => $comment,
'DOWNLOAD_COUNT' => declension((int)$attachments['_' . $post_id][$i]['download_count'], 'times'),
]);
}

@ -2016,9 +2016,9 @@ function bb_captcha($mode, $callback = '')
$secret = $bb_cfg['captcha']['secret_key'];
$public = $bb_cfg['captcha']['public_key'];
$cp_theme = $bb_cfg['captcha']['theme'];
$cp_theme = $bb_cfg['captcha']['theme'] ?? 'light';
if (!$public && !$secret) {
if (!$bb_cfg['captcha']['disabled'] && (!$public || !$secret)) {
bb_die($lang['CAPTCHA_SETTINGS']);
}

@ -35,7 +35,7 @@
</p>
<p class="attach_link">
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank"><b>{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}</b></a>
<span class="attach_stats med">({postrow.attach.cat_thumb_images.FILESIZE})</span>
<span class="attach_stats med">({postrow.attach.cat_thumb_images.FILESIZE}, {L_DOWNLOADED}: {postrow.attach.cat_thumb_images.DOWNLOAD_COUNT})</span>
</p>
<!-- IF postrow.attach.cat_thumb_images.COMMENT -->
<p class="attach_comment med">