diff --git a/CHANGELOG b/CHANGELOG index 618b6ead7..cfd710377 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +10 Oct, 2018 +fix: announce.php + 02 Sept, 2018 update: database files remove: image proxy key diff --git a/composer.lock b/composer.lock index f9cab2baf..11a1a763c 100644 --- a/composer.lock +++ b/composer.lock @@ -1,7 +1,7 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "fd2b894973e11214e834f7cb29f2a3dc", @@ -48,12 +48,12 @@ "source": { "type": "git", "url": "https://github.com/envms/fluentpdo.git", - "reference": "80a680910f0b60325390065830789b2ff82324c8" + "reference": "c4eb6339815d08a3562219dfabe040490a7764c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/envms/fluentpdo/zipball/80a680910f0b60325390065830789b2ff82324c8", - "reference": "80a680910f0b60325390065830789b2ff82324c8", + "url": "https://api.github.com/repos/envms/fluentpdo/zipball/c4eb6339815d08a3562219dfabe040490a7764c9", + "reference": "c4eb6339815d08a3562219dfabe040490a7764c9", "shasum": "" }, "require-dev": { @@ -90,7 +90,7 @@ "pdo", "query" ], - "time": "2018-08-26T19:18:05+00:00" + "time": "2018-10-10T13:50:31+00:00" }, { "name": "guzzlehttp/guzzle", @@ -275,16 +275,16 @@ }, { "name": "imdbphp/imdbphp", - "version": "v6.0.3", + "version": "v6.0.4", "source": { "type": "git", "url": "https://github.com/tboothman/imdbphp.git", - "reference": "ce0cd847eaff39594f01f1f2ce28c4fea7b31f92" + "reference": "858bba387482a349f5d91c8d555e23307900b998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tboothman/imdbphp/zipball/ce0cd847eaff39594f01f1f2ce28c4fea7b31f92", - "reference": "ce0cd847eaff39594f01f1f2ce28c4fea7b31f92", + "url": "https://api.github.com/repos/tboothman/imdbphp/zipball/858bba387482a349f5d91c8d555e23307900b998", + "reference": "858bba387482a349f5d91c8d555e23307900b998", "shasum": "" }, "require": { @@ -311,7 +311,7 @@ "GPL-2.0-or-later" ], "description": "Library for retrieving film and tv information from IMDb", - "time": "2018-08-18T22:29:04+00:00" + "time": "2018-10-02T15:19:37+00:00" }, { "name": "intervention/image", @@ -385,26 +385,26 @@ }, { "name": "league/flysystem", - "version": "1.0.46", + "version": "1.0.47", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2" + "reference": "a11e4a75f256bdacf99d20780ce42d3b8272975c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", - "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a11e4a75f256bdacf99d20780ce42d3b8272975c", + "reference": "a11e4a75f256bdacf99d20780ce42d3b8272975c", "shasum": "" }, "require": { + "ext-fileinfo": "*", "php": ">=5.5.9" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "ext-fileinfo": "*", "phpspec/phpspec": "^3.4", "phpunit/phpunit": "^5.7.10" }, @@ -465,7 +465,7 @@ "sftp", "storage" ], - "time": "2018-08-22T07:45:22+00:00" + "time": "2018-09-14T15:30:29+00:00" }, { "name": "league/glide", @@ -685,16 +685,16 @@ }, { "name": "nette/utils", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5" + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/183069866dc477fcfbac393ed486aaa6d93d19a5", - "reference": "183069866dc477fcfbac393ed486aaa6d93d19a5", + "url": "https://api.github.com/repos/nette/utils/zipball/17b9f76f2abd0c943adfb556e56f2165460b15ce", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce", "shasum": "" }, "require": { @@ -763,7 +763,7 @@ "utility", "validation" ], - "time": "2018-05-02T17:16:08+00:00" + "time": "2018-09-18T10:22:16+00:00" }, { "name": "psr/cache", @@ -1094,16 +1094,16 @@ }, { "name": "spatie/image-optimizer", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/spatie/image-optimizer.git", - "reference": "1530d6cf72070068eecab150ffb73466c3806bdd" + "reference": "620ee03c6ef0bfb5f0646e595de15965f55c4c61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/1530d6cf72070068eecab150ffb73466c3806bdd", - "reference": "1530d6cf72070068eecab150ffb73466c3806bdd", + "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/620ee03c6ef0bfb5f0646e595de15965f55c4c61", + "reference": "620ee03c6ef0bfb5f0646e595de15965f55c4c61", "shasum": "" }, "require": { @@ -1139,7 +1139,7 @@ "image-optimizer", "spatie" ], - "time": "2018-06-05T07:36:17+00:00" + "time": "2018-10-10T13:05:23+00:00" }, { "name": "spatie/temporary-directory", @@ -1189,16 +1189,16 @@ }, { "name": "symfony/process", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843" + "reference": "ee33c0322a8fee0855afcc11fff81e6b1011b529" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843", - "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843", + "url": "https://api.github.com/repos/symfony/process/zipball/ee33c0322a8fee0855afcc11fff81e6b1011b529", + "reference": "ee33c0322a8fee0855afcc11fff81e6b1011b529", "shasum": "" }, "require": { @@ -1234,7 +1234,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-08-03T11:13:38+00:00" + "time": "2018-10-02T12:40:59+00:00" }, { "name": "vlucas/phpdotenv", @@ -1394,16 +1394,16 @@ }, { "name": "symfony/var-dumper", - "version": "v3.4.15", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "f62a394bd3de96f2f5e8f4c7d685035897fb3cb3" + "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f62a394bd3de96f2f5e8f4c7d685035897fb3cb3", - "reference": "f62a394bd3de96f2f5e8f4c7d685035897fb3cb3", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ff8ac19e97e5c7c3979236b584719a1190f84181", + "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181", "shasum": "" }, "require": { @@ -1459,7 +1459,7 @@ "debug", "dump" ], - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-10-02T16:33:53+00:00" } ], "aliases": [], diff --git a/include/database.php b/include/database.php index a538cf271..559c2f2b6 100644 --- a/include/database.php +++ b/include/database.php @@ -18,7 +18,7 @@ $params = []; $query = str_replace(' ?', ' %s', $BaseQuery->getQuery(true)); $paramaters = $BaseQuery->getParameters(); - $time = $BaseQuery->getTime(); + $time = $BaseQuery->getExecutionTime(); if (!empty($paramaters) && count($paramaters) >= 1) { foreach ($paramaters as $param) { if (is_int($param)) { diff --git a/public/announce.php b/public/announce.php index 9f6def96c..b6d1b4690 100644 --- a/public/announce.php +++ b/public/announce.php @@ -230,9 +230,8 @@ ->select('last_action AS ts') ->select('UNIX_TIMESTAMP(NOW()) AS nowts') ->select('prev_action AS prevts') - ->where('(peer_id = ? OR peer_id = ?)', $peer_id, preg_replace('/ *$/s', '', $peer_id)) + ->where(['peer_id = ?' => $peer_id, 'peer_id = ?' => preg_replace('/ *$/s', '', $peer_id)]) ->where('torrent = ?', $torrentid) - ->where('(peer_id = ? OR peer_id = ?)', $peer_id, preg_replace('/ *$/s', '', $peer_id)) ->fetch(); if ($row) { @@ -425,7 +424,7 @@ $seeder = 'no'; $delete_count = $fluent->deleteFrom('peers') ->where('torrent = ?', $torrentid) - ->where('(peer_id = ? OR peer_id = ?)', $peer_id, preg_replace('/ *$/s', '', $peer_id)) + ->where(['peer_id = ?' => $peer_id, 'peer_id = ?' => preg_replace('/ *$/s', '', $peer_id)]) ->execute(); $cache->delete('peers_' . $userid); @@ -538,7 +537,7 @@ $updated = $fluent->update('peers') ->set($set) ->where('torrent = ?', $torrentid) - ->where('(peer_id = ? OR peer_id = ?)', $peer_id, preg_replace('/ *$/s', '', $peer_id)) + ->where(['peer_id = ?' => $peer_id, 'peer_id = ?' => preg_replace('/ *$/s', '', $peer_id)]) ->execute(); $cache->delete('peers_' . $userid); @@ -616,10 +615,11 @@ ->ignore() ->execute(); - echo $insert_peers; if ($insert_peers == 0) { $fluent->update('peers') ->set($update_values) + ->where('peer_id = ?', $peer_id) + ->where('ip = ?', inet_pton($realip)) ->execute(); } else { if ($seeder == 'yes') { @@ -664,6 +664,7 @@ ->execute(); } if (!empty($snatch_updateset)) { +file_put_contents('/var/log/nginx/announce.log', json_encode($snatch_updateset) . PHP_EOL, FILE_APPEND); $fluent->update('snatched') ->set($snatch_updateset) ->where('torrentid = ?', $torrentid)