Changeset 1307 in ExiteCMS for trunk/profile.php
- Timestamp:
- 02/27/08 09:57:44 (4 years ago)
- File:
-
- 1 edited
-
trunk/profile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/profile.php
r1286 r1307 92 92 $data['user_posts'] = number_format($data['user_posts']); 93 93 $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 pagesFROM ".$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); 95 95 $data['unread_count'] = ($result ? mysql_result($result, 0) : 0); 96 96 $data['user_email'] = str_replace("@","@",$data['user_email']);
Note: See TracChangeset
for help on using the changeset viewer.
