Changes and fixes in Info.php and nzbcontents.php.

This commit is contained in:
Darko
2014-04-16 14:14:35 +02:00
parent b1c37caa99
commit ae752a4ffe
5 changed files with 38 additions and 2585 deletions
+2 -5
View File
@@ -485,21 +485,18 @@ Class Sharing
if (!isset($body['USER']) || !isset($body['SID']) || !isset($body['RID']) || !isset($body['TIME']) | !isset($body['BODY'])) {
return false;
}
// Hash a unique Comment ID to associate with this message
$cid = md5($body['SID'] . $body['USER'] . $body['TIME'] . $body['BODY']);
// Insert the comment.
if ($this->db->exec(
sprintf('
INSERT INTO releasecomment
(text, createddate, issynced, shareID, gid, nzb_guid, cid, siteID, username, userID, releaseID, shared, host, sourceID)
VALUES (%s, %s, 1, %s, %s, %s, %s, %s, %s, 0, 0, 2, "", 999)',
(text, createddate, issynced, shareID, gid, nzb_guid, siteID, username, userID, releaseID, shared, host, sourceID)
VALUES (%s, %s, 1, %s, %s, %s, %s, %s, 0, 0, 2, "", 999)',
$this->db->escapeString($body['BODY']),
$this->functions->from_unixtime(($body['TIME'] > time() ? time() : $body['TIME'])),
$this->db->escapeString($body['SID']),
$this->db->escapeString($body['RID']),
$this->db->escapeString($body['RID']),
$this->db->escapeString($cid),
$this->db->escapeString($siteID),
$this->db->escapeString((substr($body['USER'], 0, 3) === 'sn-' ? 'SH_ANON' : 'SH_' . $body['USER']))
)