Commit 3f2e90e6 authored by Doris Tam's avatar Doris Tam Committed by Robert Lyon
Browse files

Bug 1825600: Fix up colourization of delete buttons and messages

This affects:
- delete forum(interaction)
- delete topic
- delete forum post
- delete group

behatnotneeded

Change-Id: I73f445bb2e26605c5e81313d5ad10039dcfb4353
parent d7597f27
......@@ -53,7 +53,7 @@ $form = pieform(array(
),
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'class' => 'btn-secondary',
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'interaction/' .$instance->get('plugin') .
($returnto == 'index' ? '/index.php?group=' . $instance->get('group') : '/view.php?id=' . $instance->get('id')),
......
......@@ -24,7 +24,7 @@ define('SUBSECTIONHEADING', get_string('nameplural', 'interaction.forum'));
$postid = param_integer('id');
$post = get_record_sql(
'SELECT p.subject, p.body, p.topic, p.parent, p.poster, ' . db_format_tsfield('p.ctime', 'ctime') . ', m.user AS moderator, t.forum, p2.subject AS topicsubject, f.group, f.title AS forumtitle, g.name AS groupname, COUNT(p3.id)
'SELECT p.subject, p.body, p.topic, p.parent, p.poster, p.approved, ' . db_format_tsfield('p.ctime', 'ctime') . ', m.user AS moderator, t.forum, p2.subject AS topicsubject, f.group, f.title AS forumtitle, g.name AS groupname, COUNT(p3.id)
FROM {interaction_forum_post} p
INNER JOIN {interaction_forum_topic} t ON (p.topic = t.id AND t.deleted != 1)
INNER JOIN {interaction_forum_post} p2 ON (p2.topic = t.id AND p2.parent IS NULL)
......@@ -40,7 +40,7 @@ $post = get_record_sql(
INNER JOIN {interaction_instance} f2 ON (t2.forum = f2.id AND f2.deleted != 1 AND f2.group = f.group)
WHERE p.id = ?
AND p.deleted != 1
GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12',
GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13',
array(0, $postid)
);
......@@ -74,7 +74,7 @@ $form = pieform(array(
),
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'class' => 'btn-secondary',
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'interaction/forum/topic.php?id=' . $post->topic . '&post=' . $postid
),
......
......@@ -27,7 +27,8 @@ $topicid = param_integer('id');
$returnto = param_alpha('returnto', 'topic');
$topic = get_record_sql(
'SELECT f.group, f.id AS forumid, f.title, g.name AS groupname, p.poster, p.subject, p.body, COUNT(p2.id), ' . db_format_tsfield('p.ctime', 'ctime') . ', t.closed, m.user AS moderator
'SELECT f.group, f.id AS forumid, f.title, g.name AS groupname,
p.poster, p.subject, p.body, p.approved, COUNT(p2.id), ' . db_format_tsfield('p.ctime', 'ctime') . ', t.closed, m.user AS moderator
FROM {interaction_forum_topic} t
INNER JOIN {interaction_instance} f ON (f.id = t.forum AND f.deleted != 1)
INNER JOIN {group} g ON (g.id = f.group AND g.deleted = ?)
......@@ -42,7 +43,7 @@ $topic = get_record_sql(
INNER JOIN {interaction_instance} f2 ON (t2.forum = f2.id AND f2.deleted != 1 AND f2.group = f.group)
WHERE t.id = ?
AND t.deleted != 1
GROUP BY 1, 2, 3, 4, 5, 6, 7, 9, 10, 11',
GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12',
array(0, $topicid)
);
......@@ -75,7 +76,7 @@ $form = pieform(array(
),
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'class' => 'btn-secondary',
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . ($returnto == 'view' ? 'interaction/forum/view.php?id=' . $topic->forumid : 'interaction/forum/topic.php?id=' . $topicid),
),
......
Supports Markdown
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