This commit is contained in:
DariusIII
2019-08-16 22:44:47 +02:00
parent 26097d62d5
commit d65064fd19
@@ -320,7 +320,7 @@ class ProcessAdditional
* Password status of the current release.
* @var array
*/
protected $_passwordStatus;
protected $_passwordStatus = [];
/**
* Does the current release have a password?
@@ -1087,7 +1087,7 @@ class ProcessAdditional
$this->_debug('ArchiveInfo: Compressed file has a password.');
}
$this->_releaseHasPassword = true;
$this->_passwordStatus[] = Releases::PASSWD_RAR;
$this->_passwordStatus = [Releases::PASSWD_RAR];
return false;
}
@@ -1154,13 +1154,13 @@ class ProcessAdditional
if (isset($file['pass']) && $file['pass'] === true) {
$this->_releaseHasPassword = true;
$this->_passwordStatus[] = Releases::PASSWD_RAR;
$this->_passwordStatus = [Releases::PASSWD_RAR];
break;
}
if ($this->_innerFileBlacklist !== false && preg_match($this->_innerFileBlacklist, $file['name'])) {
$this->_releaseHasPassword = true;
$this->_passwordStatus[] = Releases::PASSWD_POTENTIAL;
$this->_passwordStatus = [Releases::PASSWD_POTENTIAL];
break;
}
@@ -1216,7 +1216,7 @@ class ProcessAdditional
if (ReleaseFile::addReleaseFiles($this->_release->id, $file['name'], $file['size'], $file['date'], $file['pass'], '', $file['crc32'] ?? '')) {
$this->_addedFileInfo++;
if ((int) $file['pass'] === 1) {
$this->_passwordStatus[] = Releases::PASSWD_RAR;
$this->_passwordStatus = [Releases::PASSWD_RAR];
}
if ($this->_echoCLI) {
@@ -1231,7 +1231,7 @@ class ProcessAdditional
$this->_debug('Codec spam found, setting release to potentially passworded.');
}
$this->_releaseHasPassword = true;
$this->_passwordStatus[] = Releases::PASSWD_POTENTIAL;
$this->_passwordStatus = [Releases::PASSWD_POTENTIAL];
} //Run a PreDB filename check on insert to try and match the release
elseif ($file['name'] !== '' && strpos($file['name'], '.') !== 0) {
$this->_release['filename'] = $file['name'];
@@ -2300,7 +2300,7 @@ class ProcessAdditional
$this->_foundSample = $this->_processThumbnails ? false : true;
$this->_foundPAR2Info = false;
$this->_passwordStatus[] = Releases::PASSWD_NONE;
$this->_passwordStatus = [Releases::PASSWD_NONE];
$this->_releaseHasPassword = false;
$this->_releaseGroupName = UsenetGroup::getNameByID($this->_release->groups_id);