Merge branch 'MDL-47916-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE

This commit is contained in:
Marina Glancy
2014-10-29 16:15:32 +08:00
+5 -1
View File
@@ -459,9 +459,13 @@ class mod_forum_external extends external_api {
}
// Function forum_get_all_discussion_posts adds postread field.
if (!isset($post->postread)) {
// Note that the value returned can be a boolean or an integer. The WS expects a boolean.
if (empty($post->postread)) {
$posts[$pid]->postread = false;
} else {
$posts[$pid]->postread = true;
}
$posts[$pid]->canreply = $canreply;
if (!empty($posts[$pid]->children)) {
$posts[$pid]->children = array_keys($posts[$pid]->children);