From e47e6272b098047df5d4c4a3717a23ff938b3f9e Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 15 Jun 2023 17:14:01 +0700 Subject: [PATCH] Minor improvements (#181) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- library/ajax/view_torrent.php | 4 ++-- library/config.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff703ab2..3d9e1086 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ - Release v2.1.5-2023.06 🎉 - Fixed $bb_cfg['pm_days_keep'] [\#180](https://github.com/torrentpier/torrentpier-lts/pull/180) ([belomaxorka](https://github.com/belomaxorka)) - IP storage bugfix [\#177](https://github.com/torrentpier/torrentpier-lts/pull/177) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#172](https://github.com/torrentpier/torrentpier-lts/pull/172), [\#175](https://github.com/torrentpier/torrentpier-lts/pull/175), [\#176](https://github.com/torrentpier/torrentpier-lts/pull/176), [\#178](https://github.com/torrentpier/torrentpier-lts/pull/178), [\#179](https://github.com/torrentpier/torrentpier-lts/pull/179) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#172](https://github.com/torrentpier/torrentpier-lts/pull/172), [\#175](https://github.com/torrentpier/torrentpier-lts/pull/175), [\#176](https://github.com/torrentpier/torrentpier-lts/pull/176), [\#178](https://github.com/torrentpier/torrentpier-lts/pull/178), [\#179](https://github.com/torrentpier/torrentpier-lts/pull/179), [\#181](https://github.com/torrentpier/torrentpier-lts/pull/181) ([belomaxorka](https://github.com/belomaxorka)) - Fixed empty user search box [\#171](https://github.com/torrentpier/torrentpier-lts/pull/171) ([belomaxorka](https://github.com/belomaxorka)) - Added some placeholders for input fields [\#173](https://github.com/torrentpier/torrentpier-lts/pull/173) ([belomaxorka](https://github.com/belomaxorka)) - Maked max post length configurable [\#174](https://github.com/torrentpier/torrentpier-lts/pull/174) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/library/ajax/view_torrent.php b/library/ajax/view_torrent.php index d0ebcdf3..0a045021 100644 --- a/library/ajax/view_torrent.php +++ b/library/ajax/view_torrent.php @@ -17,7 +17,7 @@ $torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']); $filename = get_attachments_dir() .'/'. $torrent['physical_filename']; -if (($file_contents = @file_get_contents($filename)) === false) +if (!file_exists($filename) || (false === ($file_contents = file_get_contents($filename)))) { if (IS_AM) { @@ -183,4 +183,4 @@ function clean_tor_dirname ($dirname) if ($bnc_error) $tor_filelist = ''.$lang['ERROR_BUILD'].'

'.$tor_filelist; -$this->response['html'] = $tor_filelist; \ No newline at end of file +$this->response['html'] = $tor_filelist; diff --git a/library/config.php b/library/config.php index a48c68fe..faa29afd 100644 --- a/library/config.php +++ b/library/config.php @@ -125,7 +125,7 @@ $bb_cfg['cache']['redis'] = array( 'con_required' => true, ); -// Available cache types: memcache, sqlite, redis, apc, xcache (default of filecache) +// Available cache types: filecache, memcache, sqlite, redis, apc, xcache (default filecache) # name => array( (string) type, (array) cfg ) $bb_cfg['cache']['engines'] = array( 'bb_cache' => array('filecache', array()), @@ -137,7 +137,7 @@ $bb_cfg['cache']['engines'] = array( 'bb_poll_data' => array('filecache', array()), ); // Datastore -// Available datastore types: memcache, sqlite, redis, apc, xcache (default filecache) +// Available datastore types: filecache, memcache, sqlite, redis, apc, xcache (default filecache) $bb_cfg['datastore_type'] = 'filecache'; // Server