mirror of
https://github.com/e107inc/e107.git
synced 2025-07-24 00:12:24 +02:00
Issue #2380 Possible fix for forum thread_lastuser field migration. (untested)
This commit is contained in:
@@ -1467,7 +1467,7 @@ class forumUpgrade
|
|||||||
$thread['thread_views'] = $post['thread_views'];
|
$thread['thread_views'] = $post['thread_views'];
|
||||||
$thread['thread_active'] = $post['thread_active'];
|
$thread['thread_active'] = $post['thread_active'];
|
||||||
$thread['thread_sticky'] = $post['thread_s'];
|
$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'];
|
$thread['thread_total_replies'] = $post['thread_total_replies'];
|
||||||
|
|
||||||
$userInfo = $this -> getUserInfo($post['thread_user']);
|
$userInfo = $this -> getUserInfo($post['thread_user']);
|
||||||
@@ -1491,6 +1491,23 @@ class forumUpgrade
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getLastUser($string)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(empty($string))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
list($num,$name) = explode(".",$string,2);
|
||||||
|
|
||||||
|
return intval($num);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addPost(&$post)
|
function addPost(&$post)
|
||||||
{
|
{
|
||||||
global $forum;
|
global $forum;
|
||||||
|
Reference in New Issue
Block a user