Skip to content

Commit

Permalink
Merge branch 'MDL-43709-master' of https://github.com/pauln/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 4, 2015
2 parents ac41247 + 8ff7531 commit 259ca15
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mod/forum/lib.php
Expand Up @@ -6811,16 +6811,20 @@ function forum_reset_userdata($data) {
$types = array();
} else if (!empty($data->reset_forum_types)){
$removeposts = true;
$typesql = "";
$types = array();
$sqltypes = array();
$forum_types_all = forum_get_forum_types_all();
foreach ($data->reset_forum_types as $type) {
if (!array_key_exists($type, $forum_types_all)) {
continue;
}
$typesql .= " AND f.type=?";
$types[] = $forum_types_all[$type];
$params[] = $type;
$sqltypes[] = $type;
}
if (!empty($sqltypes)) {
list($typesql, $typeparams) = $DB->get_in_or_equal($sqltypes);
$typesql = " AND f.type " . $typesql;
$params = array_merge($params, $typeparams);
}
$typesstr = get_string('resetforums', 'forum').': '.implode(', ', $types);
}
Expand Down

0 comments on commit 259ca15

Please sign in to comment.