Author |
Message |
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Fri May 10, 2013 6:49 am |
|
In block-NSNGD_Advanced.php and block-NSNGD_Hot.php the WHERE clause for the active field was probably forget...?! I have added the clause to prevent show disabled download-links.
block-NSNGD_Advanced.php:
Code:$result = $db->sql_query('SELECT `lid`, `title`, `hits` FROM `' . $prefix . '_nsngd_downloads` WHERE `active` = 1 ORDER BY `date` DESC LIMIT 0, ' . $blkh);
|
block-NSNGD_Hot.php:
Code:$result = $db->sql_query('SELECT `lid`, `title` FROM `' . $prefix . '_nsngd_downloads` WHERE `active` = 1 ORDER BY `hits` DESC LIMIT 0, ' . $blkh);
|
|
_________________ Github: RavenNuke |
|
|
|
spasticdonkey
RavenNuke(tm) Development Team
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Fri May 10, 2013 11:03 am |
|
Good point. Looks like there's a few other download related blocks that have the same issue as well. |
|
|
|
|
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Sat May 11, 2013 5:09 am |
|
This one as well
Code:$result = $db->sql_query('SELECT `lid`, a.`title`, `hits`, b.`title` FROM `' . $prefix . '_nsngd_downloads` a'
. ' LEFT JOIN `' . $prefix . '_nsngd_categories` b ON (a.`cid` = b.`cid`) ORDER BY `date` DESC LIMIT 0, ' . $blkh);
|
Replace with
Code:$result = $db->sql_query('SELECT `lid`, a.`title`, `hits`, b.`title` FROM `' . $prefix . '_nsngd_downloads` a'
. ' LEFT JOIN `' . $prefix . '_nsngd_categories` b ON (a.`cid` = b.`cid`) WHERE `active` = 1 ORDER BY `date` DESC LIMIT 0, ' . $blkh);
|
|
|
|
|
|
neralex
|
Posted:
Sat May 11, 2013 6:02 am |
|
block-NSNGD_New.php:
Code:$result = $db->sql_query('SELECT `lid`, `title` FROM `' . $prefix . '_nsngd_downloads` WHERE `active` = 1 ORDER BY `lid` DESC LIMIT 0, ' . $blkh);
|
|
|
|
|
|
montego
Site Admin
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat May 11, 2013 8:03 am |
|
|
|
|
montego
|
Posted:
Sat May 11, 2013 9:04 am |
|
Question to the group on NSNGD Advanced block.
Regarding the Totals at the top. These currently do not consider active vs. not. I am thinking that should still be the case as I would want to have the complete picture over time just what has been in the system and server up whether I've deactivated a download or not. However, just curious about the feelings here. |
|
|
|
|
neralex
|
Posted:
Sat May 11, 2013 9:19 am |
|
I think only the loops need the clause.
ed: qu rm |
Last edited by neralex on Sun May 12, 2013 7:30 am; edited 3 times in total |
|
|
|
montego
|
Posted:
Sun May 12, 2013 6:56 am |
|
I was hoping you were going to say that...
BTW, no need to quote the previous posting in its entirety as the context is right above (or will be very close). All it does is add more bytes to the DB. |
|
|
|
|
|