mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 19:28:55 +00:00
Add the old 2014 query while the new one is not fixed.
This commit is contained in:
@@ -214,8 +214,8 @@ class Enzebe
|
||||
$this->pdo->queryExec(
|
||||
sprintf('
|
||||
UPDATE releases SET nzbstatus = %d %s WHERE id = %d',
|
||||
\NZB::NZB_ADDED,
|
||||
($nzb_guid === '' ? '' : ', nzb_guid = ' . $this->pdo->escapestring(md5($nzb_guid))),
|
||||
NZB::NZB_ADDED,
|
||||
($nzb_guid === '' ? '' : ', nzb_guid = UNHEX( ' . $this->pdo->escapestring(md5($nzb_guid)) . ' )'),
|
||||
$relID
|
||||
)
|
||||
);
|
||||
|
||||
@@ -323,15 +323,20 @@ Class Sharing
|
||||
}
|
||||
|
||||
// Update first time seen.
|
||||
$this->pdo->queryExec(
|
||||
sprintf("
|
||||
UPDATE sharing_sites ss
|
||||
INNER JOIN release_comments rc ON rc.siteid = ss.site_guid
|
||||
SET ss.first_time = rc.createddate
|
||||
WHERE rc.createddate > '2005-01-01'
|
||||
"
|
||||
)
|
||||
$siteTimes = $this->pdo->queryDirect(
|
||||
'SELECT createddate, siteid FROM release_comments WHERE createddate > \'2005-01-01\' GROUP BY siteid ORDER BY createddate ASC'
|
||||
);
|
||||
if ($siteTimes instanceof \Traversable && $siteTimes->rowCount()) {
|
||||
foreach ($siteTimes as $site) {
|
||||
$this->pdo->queryExec(
|
||||
sprintf(
|
||||
'UPDATE sharing_sites SET first_time = %s WHERE site_guid = %s',
|
||||
$this->pdo->escapeString($site['createddate']),
|
||||
$this->pdo->escapeString($site['siteid'])
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user