Is Admin Post Edit Broken in 1.4.13 ?
netjockey Offline
Junior Member
**
Posts: 1
Joined: Mar 2010
Post: #9
RE: Is Admin Post Edit Broken in 1.4.13 ?
To Fixed the Last post Bug

Replace

PHP Code:
$db->update_query('posts', $update_array, 'pid='.$post['pid']); 


With

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
 
$db->update_query('posts', $update_array, 'pid='.$post['pid']);  
 // if it's the last  post, we should update the thread and forums...
    $lastcheck = $db->fetch_array($db->simple_select("posts", "pid", "tid='{$thread['tid']}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "desc")));
    if($lastcheck['pid'] == $post['pid'])
    {
        $update_array1['lastposter'] = $update_array['username'] ;
        $update_array1['lastposteruid'] = $update_array['uid'] ;
        $db->update_query('threads', $update_array1, 'tid='.$thread['tid']);  
        $db->update_query('forums', $update_array1, 'lastposttid='.$thread['tid']);
}
 

(This post was last modified: 06-14-2010 06:08 PM by netjockey.)
06-14-2010 06:06 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Is Admin Post Edit Broken in 1.4.13 ? - netjockey - 06-14-2010 06:06 PM

 Standard Tools
Forum Jump: