Ignore:
Timestamp:
10/02/07 22:27:18 (5 years ago)
Author:
hverton
Message:

Added an image upload function to the Wiki module
Optimized the speed of the download panels
Fixed a crash due to "attachment to big" in M2F

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php

    r844 r862  
    2020// get the list of latest threads 
    2121$result = dbquery( 
    22     "SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf 
     22    "SELECT tf.*, tt.*, tu.user_id,user_name FROM ".$db_prefix."forums tf 
    2323    INNER JOIN ".$db_prefix."threads tt USING(forum_id) 
    2424    INNER JOIN ".$db_prefix."posts tp USING(thread_id) 
     
    3838    while ($data = dbarray($result)) { 
    3939        $data['poll'] = fpm_panels_poll_exists($data['forum_id'], $data['thread_id']); 
    40         $data['count_posts']--; 
     40        $data2 = dbarray(dbquery("SELECT MAX(post_id) AS last_id FROM ".$db_prefix."posts WHERE thread_id = '".$data['thread_id']."'")); 
     41        $data['last_id'] = $data2['last_id']; 
     42        $data['count_posts'] = dbcount("(*)", "posts", "thread_id = '".$data['thread_id']."'") - 1; 
    4143        $threadlist[] = $data; 
    4244    } 
Note: See TracChangeset for help on using the changeset viewer.