Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Fri May 10, 2013 6:49 am Reply with quote

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 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Fri May 10, 2013 11:03 am Reply with quote

Good point. Looks like there's a few other download related blocks that have the same issue as well.
 
View user's profile Send private message Visit poster's website
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Sat May 11, 2013 5:09 am Reply with quote

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);
 
View user's profile Send private message
neralex







PostPosted: Sat May 11, 2013 6:02 am Reply with quote

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

PostPosted: Sat May 11, 2013 8:03 am Reply with quote

Wow... Embarassed Never noticed that before. Bang Head

Sorry folks. Good catch neralex and thanks all for posting the solution for folks.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
montego







PostPosted: Sat May 11, 2013 9:04 am Reply with quote

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







PostPosted: Sat May 11, 2013 9:19 am Reply with quote

I think only the loops need the clause.

ed: qu rm Smile


Last edited by neralex on Sun May 12, 2013 7:30 am; edited 3 times in total 
montego







PostPosted: Sun May 12, 2013 6:56 am Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©