Closed JN-Jones closed 9 years ago
At least the phpbb 3 module also tries to update the attachment counter:
$attach_details = $this->get_import->post_attachment_details($data['post_msg_id']);
$db->write_query("UPDATE ".TABLE_PREFIX."threads SET attachmentcount = attachmentcount + 1 WHERE tid = '".$attach_details['tid']."'");
As we want to add the counter logic to the merge system (avoid running the recount/rebuild tools) that part should also be included.
I've also decided to simplify the uploadspath process, it's pretty much the same.
Atm every attachment module has a
after_insert
function which basically looks like this for all boards:Mostly the
merge_fetch_remote_file($import_session['uploadspath'].'/'.$data['attach_location'])
part changes. As we already have function likegenerate_raw_filename
we can move that function to the general class.