Ooohh... that was something I didn't notice it was added and I did not merge into my branch.
I'm playing around with it a bit trying to figure out how to move that code out of MessageIndex.controller.php.
In the meantime, instead of the code:
if (!empty($prefix))
{
$db = database();
$db->insert('ignore',
'{db_prefix}topic_prefix',
array(
'id_prefix' => 'int',
'id_topic' => 'int',
),
array(
$prefix,
$row['id_topic']
),
array('id_prefix', 'id_topic')
);
}
You should be able to use something like this:
$prefix = new TopicPrefix();
$prefix_id = (int) $_REQUEST['prefix'];
foreach ($_REQUEST['topics'] as $topic)
{
$prefix->updateTopicPrefix($topic, $prefix_id);
}
Not tested, so it may be broken... okay, let's face reality: knowing myself it is broken.