Remove old code for release sizes that caused issues in additional postporcessing in PHP8

This commit is contained in:
DariusIII
2021-12-06 00:48:08 +01:00
parent 8e6e2f30be
commit b3f89e013d
2 changed files with 43 additions and 51 deletions
@@ -507,13 +507,9 @@ class ProcessAdditional
$this->_maximumRarPasswordChecks = ($this->_maximumRarPasswordChecks < 1 ? 1 : $this->_maximumRarPasswordChecks);
// Maximum size of releases in GB.
$this->_maxSize =
(Settings::settingValue('..maxsizetopostprocess') !== '') ? (int) Settings::settingValue('..maxsizetopostprocess') : 100;
$this->_maxSize = ($this->_maxSize > 0 ? ('AND r.size < '.((int) $this->_maxSize * 1073741824)) : '');
$this->_maxSize = (Settings::settingValue('..maxsizetopostprocess') !== '') ? (int) Settings::settingValue('..maxsizetopostprocess') : 100;
// Minimum size of releases in MB.
$this->_minSize =
(Settings::settingValue('..minsizetopostprocess') !== '') ? (int) Settings::settingValue('..minsizetopostprocess') : 100;
$this->_minSize = ($this->_minSize > 0 ? ('AND r.size > '.((int) $this->_minSize * 1048576)) : '');
$this->_minSize = (Settings::settingValue('..minsizetopostprocess') !== '') ? (int) Settings::settingValue('..minsizetopostprocess') : 100;
// Use the alternate NNTP provider for downloading Message-ID's ?
$this->_alternateNNTP = (int) Settings::settingValue('..alternate_nntp') === 1;
@@ -656,6 +652,7 @@ class ProcessAdditional
->where('categories.disablepreview', '=', 0);
if ($this->_maxSize > 0) {
$releasesQuery->where('releases.size', '<', (int) $this->_maxSize * 1073741824);
}
if ($this->_minSize > 0) {
$releasesQuery->where('releases.size', '>', (int) $this->_minSize * 1048576);