Commit 14ad7c34 authored by Francois Marier's avatar Francois Marier
Browse files

Use the documented order of arguments for implode()



This is a cleanup only, both orders work fine.
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 7eaf97b6
......@@ -94,19 +94,19 @@ if ($membership && isset($_POST['checked'])) {
$alltopics = get_column('interaction_forum_topic', 'id', 'forum', $forumid, 'deleted', 0);
if ($checked == array_intersect($checked, $alltopics)) { // $checked is a subset of the topics in this forum
if ($moderator && $type == 'sticky') {
set_field_select('interaction_forum_topic', 'sticky', 1, 'id IN (' . implode($checked, ',') . ')', array());
set_field_select('interaction_forum_topic', 'sticky', 1, 'id IN (' . implode(',', $checked) . ')', array());
$SESSION->add_ok_msg(get_string('topicstickysuccess', 'interaction.forum'));
}
else if ($moderator && $type == 'unsticky') {
set_field_select('interaction_forum_topic', 'sticky', 0, 'id IN (' . implode($checked, ',') . ')', array());
set_field_select('interaction_forum_topic', 'sticky', 0, 'id IN (' . implode(',', $checked) . ')', array());
$SESSION->add_ok_msg(get_string('topicunstickysuccess', 'interaction.forum'));
}
else if ($moderator && $type == 'closed') {
set_field_select('interaction_forum_topic', 'closed', 1, 'id IN (' . implode($checked, ',') . ')', array());
set_field_select('interaction_forum_topic', 'closed', 1, 'id IN (' . implode(',', $checked) . ')', array());
$SESSION->add_ok_msg(get_string('topicclosedsuccess', 'interaction.forum'));
}
else if ($moderator && $type == 'open') {
set_field_select('interaction_forum_topic', 'closed', 0, 'id IN (' . implode($checked, ',') . ')', array());
set_field_select('interaction_forum_topic', 'closed', 0, 'id IN (' . implode(',', $checked) . ')', array());
$SESSION->add_ok_msg(get_string('topicopenedsuccess', 'interaction.forum'));
}
else if ($type == 'subscribe' && !$forum->subscribed) {
......@@ -126,7 +126,7 @@ if ($membership && isset($_POST['checked'])) {
}
else if ($type == 'unsubscribe' && !$forum->subscribed) {
delete_records_sql('DELETE FROM {interaction_forum_subscription_topic}
WHERE topic IN (' . implode($checked, ',') . ') AND "user" = ?',
WHERE topic IN (' . implode(',', $checked) . ') AND "user" = ?',
array($USER->get('id')
));
$SESSION->add_ok_msg(get_string('topicunsubscribesuccess', 'interaction.forum'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment