miniBB ®  
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
News & Announcements miniBB Support Forums / News & Announcements /   

Moving Replies add-on's quick fix

Author Paul
Lead Developer
#1 | Posted: 2 Mar 2010 07:48 | Edited by: Paul 
Moving Replies add-on has been updated recently (both under Downloads and Compiler) to reduce resources on database when moving multiple messages at once. The fix is quite easy: under addon_movepost2.php, look up for the code which says:

$topic_id=$topicid;
foreach($movedMsgs as $postid) $tot+=updateArray(array('topic_id'),$Tp,'post_id',$postid);

$forum_id=$fornew;
foreach($movedMsgs as $postid) $tot+=updateArray(array('forum_id'),$Tp,'post_id',$postid);

it has been replaced to:

$topic_id=$topicid;
$forum_id=$fornew;
foreach($movedMsgs as $postid) {
$tot+=updateArray(array('topic_id', 'forum_id'), $Tp, 'post_id', $postid);
}

That way we reduce duplicate update operations which affect MINIBB_POSTS table.

Author tom322
Registered
#2 | Posted: 2 Mar 2010 10:23 
Done, thank you, works OK.

News & Announcements miniBB Support Forums / News & Announcements / Moving Replies add-on's quick fix Top
Your Reply Click this icon to move up to the quoted message
 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
  Extend your miniBB-forums, attaching the images and files,
get the File and Picture Attachments add-on!
Galleries / Attachments Addon for miniBB