Changeset 1307 in ExiteCMS for trunk/profile.php


Ignore:
Timestamp:
02/27/08 09:57:44 (4 years ago)
Author:
root
Message:

removed the thread_page field from the threads_read table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/profile.php

    r1286 r1307  
    9292    $data['user_posts'] = number_format($data['user_posts']); 
    9393    $data['show_viewposts_button'] = ($data['user_posts'] > 0 and file_exists(PATH_MODULES."forum_threads_list_panel/my_posts.php")); 
    94     $result = dbquery("SELECT count(*) as unread, sum(tr.thread_page) AS pages FROM ".$db_prefix."posts p LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id WHERE tr.user_id = '".$data['user_id']."' AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") AND (p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read)", false); 
     94    $result = dbquery("SELECT count(*) as unread FROM ".$db_prefix."posts p LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id WHERE tr.user_id = '".$data['user_id']."' AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") AND (p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read)", false); 
    9595    $data['unread_count'] = ($result ? mysql_result($result, 0) : 0); 
    9696    $data['user_email'] = str_replace("@","@",$data['user_email']); 
Note: See TracChangeset for help on using the changeset viewer.