Prevent releases with filename SAMPLE/sample to be inserted into predb table (prevents wrong renames of releases, hopefuly)

This commit is contained in:
DariusIII
2017-09-11 15:19:41 +02:00
parent dcbb62dfbb
commit c57325db57
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -1,4 +1,5 @@
2017-09-11 DariusIII
* Chg: Prevent releases with filename SAMPLE/sample to be inserted into predb table (prevents wrong renames of releases, hopefuly)
* Chg: Update php-tmdb/api to version 2.1.10
2017-09-08 DariusIII
* Chg: Update predb_hashes table and triggers
+3 -3
View File
@@ -297,7 +297,7 @@ class IRCScraper extends IRCClient
$query .= (! empty($this->_curPre['reqid']) ? 'requestid, ' : '');
$query .= (! empty($this->_curPre['group_id']) ? 'groups_id, ' : '');
$query .= (! empty($this->_curPre['nuked']) ? 'nuked, ' : '');
$query .= (! empty($this->_curPre['filename']) ? 'filename, ' : '');
$query .= (! empty($this->_curPre['filename']) && ! preg_match('/^sample$/i', $this->_curPre['filename']) ? 'filename, ' : '');
$query .= 'predate, title) VALUES (';
@@ -309,7 +309,7 @@ class IRCScraper extends IRCClient
$query .= (! empty($this->_curPre['reqid']) ? $this->_curPre['reqid'].', ' : '');
$query .= (! empty($this->_curPre['group_id']) ? $this->_curPre['group_id'].', ' : '');
$query .= (! empty($this->_curPre['nuked']) ? $this->_curPre['nuked'].', ' : '');
$query .= (! empty($this->_curPre['filename']) ? $this->_pdo->escapeString($this->_curPre['filename']).', ' : '');
$query .= (! empty($this->_curPre['filename']) && ! preg_match('/^sample$/i', $this->_curPre['filename']) ? $this->_pdo->escapeString($this->_curPre['filename']).', ' : '');
$query .= (! empty($this->_curPre['predate']) ? $this->_curPre['predate'].', ' : 'NOW(), ');
$query .= '%s)';
@@ -347,7 +347,7 @@ class IRCScraper extends IRCClient
$query .= (! empty($this->_curPre['group_id']) ? 'groups_id = '.$this->_curPre['group_id'].', ' : '');
$query .= (! empty($this->_curPre['predate']) ? 'predate = '.$this->_curPre['predate'].', ' : '');
$query .= (! empty($this->_curPre['nuked']) ? 'nuked = '.$this->_curPre['nuked'].', ' : '');
$query .= (! empty($this->_curPre['filename']) ? 'filename = '.$this->_pdo->escapeString($this->_curPre['filename']).', ' : '');
$query .= (! empty($this->_curPre['filename']) && ! preg_match('/^sample$/i', $this->_curPre['filename']) ? 'filename = '.$this->_pdo->escapeString($this->_curPre['filename']).', ' : '');
$query .= (
(empty($this->_oldPre['category']) && ! empty($this->_curPre['category']))
? 'category = '.$this->_pdo->escapeString($this->_curPre['category']).', '