1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-23 16:01:39 +02:00

Issue #2380 Possible fix for forum thread_lastuser field migration. (untested)

This commit is contained in:
Cameron
2017-02-04 11:14:42 -08:00
parent 3409dfee65
commit f11a3b95d5

View File

@@ -1467,7 +1467,7 @@ class forumUpgrade
$thread['thread_views'] = $post['thread_views'];
$thread['thread_active'] = $post['thread_active'];
$thread['thread_sticky'] = $post['thread_s'];
// $thread['thread_lastuser'] = $post['thread_lastuser'];
$thread['thread_lastuser'] = $this->getLastUser($post['thread_lastuser']);
$thread['thread_total_replies'] = $post['thread_total_replies'];
$userInfo = $this -> getUserInfo($post['thread_user']);
@@ -1491,6 +1491,23 @@ class forumUpgrade
return $result;
}
private function getLastUser($string)
{
if(empty($string))
{
return 0;
}
list($num,$name) = explode(".",$string,2);
return intval($num);
}
function addPost(&$post)
{
global $forum;