Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Yuna Scatari Edition (YSE) (http://www.bvlist.com/forumdisplay.php?f=22)
-   -   BUG: Leeching after stopping torrent (http://www.bvlist.com/showthread.php?t=1254)

dezza 24th October 2008 18:41

BUG: Peers not subtracted after deleting torrent
 
2 Attachment(s)
A friend of mine reported this, and we're having internal tests on the newest RC2.1 BoLaMn release, we've fixed several bugs so far and we're interested in sharing these fixes as we keep a log of changes, have you applied several fixes yourself, then you can write to me here and I will share them with you if you're a coder..

THE PROBLEM is that after deleting a torrent it doesn't subtract the peers (both leechers and seeders)
This doesn't show in browse, only these stats.

Attachment 496

Attachment 497

And I prefer if everyone will append BUG: to their bugreports and bug to the thread tags instead of screaming "HEEELP OH FAAACK HELP ME WITH STAFF.PHP!!!" or "FIX MY FORUM PLZ PLZ NEED CODER" in this way we can quickly fix up our code when there's a solution, then you can append [SOLVED]

I'm not home right now, but when I come home I will look for a solution and post it here!

What about creating a sticky "known-bugs" list with fixes in it ?

kp380lv 24th October 2008 22:30

Open cleanup.php -> Go to line 101

Replace this:

Code:

sql_query("DELETE FROM peers WHERE last_action < FROM_UNIXTIME($deadtime)");
With this:

Code:

sql_query("DELETE FROM peers WHERE last_action < FROM_UNIXTIME($deadtime)") or sqlerr(__FILE__,__LINE__);

dezza 25th October 2008 15:36

It is not when torrents become dead because of no seeders, it is when a administrator DELETES a torrent!

I already have applied the line you gave me before you wrote it here!


UPDATE:


/deltorrent.php

Add this with the other SQL queries.
PHP Code:

sql_query("DELETE FROM peers WHERE torrent IN (" implode(", "array_map("sqlesc"$_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__); 

Seems only to happen when you use the DELETE button at the bottom in browse.php


All times are GMT +2. The time now is 21:02.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.