[bug fix] discarded stories are dipalyed in user profile

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2006, 06:18 PM
Constant Pligger
 
Join Date: Feb 2006
Posts: 101
Discarded stories are displayed in the user profile in the "shaken" view, which is all stories the user voted for (don't know why its called shaken...)

Here is the fix for that:
Open user.php and under function do_history():

replace:
$rows = $db->get_var("SELECT count(*) FROM links WHERE link_author=$user->id AND");
$links = $db->get_col("SELECT link_id FROM links WHERE link_author=$user->id AND ORDER BY link_date DESC LIMIT $offset,$page_size");

with:
$rows = $db->get_var("SELECT count(*) FROM links WHERE link_author=$user->id AND link_status !='discard'");
$links = $db->get_col("SELECT link_id FROM links WHERE link_author=$user->id AND link_status !='discard' ORDER BY link_date DESC LIMIT $offset,$page_size");
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newline ability needed for a field in user profile rossoonline Questions and Comments 0 09-18-2007 07:23 PM
No pagination for stories in profile kbeeveer46 Questions and Comments 0 08-07-2006 02:22 AM
User vote count shouldn't include discarded stories gragland Questions and Comments 0 07-26-2006 09:14 PM
How can I add new fields to user profile gragland Questions and Comments 0 07-18-2006 01:03 AM
[bug fix] add pagination to user profile gragland Questions and Comments 3 07-08-2006 10:33 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development