Changeset 1322 in ExiteCMS for trunk/forum/index.php


Ignore:
Timestamp:
02/28/08 00:27:46 (4 years ago)
Author:
hverton
Message:

conversion of module version numbers so they can be compared numerically
fixed typo in forum/index.php that caused a query to crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/index.php

    r1311 r1322  
    8181    if (iMEMBER) { 
    8282        if ($userdata['user_posts_unread']) { 
    83             $result = dbquery(" 
     83            $result2 = dbquery(" 
    8484                SELECT count(*) as unread  
    8585                    FROM ".$db_prefix."posts p  
    8686                        LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id  
    8787                    WHERE tr.user_id = '".$userdata['user_id']."'  
     88                        AND tr.forum_id = '".$data['forum_id']."'  
    8889                        AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") 
    8990                        AND ((p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read) 
     
    9192                ); 
    9293        } else { 
    93             $result = dbquery(" 
     94            $result2 = dbquery(" 
    9495                SELECT count(*) as unread  
    9596                    FROM ".$db_prefix."posts p  
    9697                        LEFT JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id  
    9798                    WHERE tr.user_id = '".$userdata['user_id']."'  
     99                        AND tr.forum_id = '".$data['forum_id']."'  
    98100                        AND p.post_author != '".$userdata['user_id']."' 
    99101                        AND p.post_edituser != '".$userdata['user_id']."' 
Note: See TracChangeset for help on using the changeset viewer.