Permalink
Browse files

MDL-29909 wiki: do not show groups when no groups present

  • Loading branch information...
1 parent 37699ac commit 854a3741bc047b3d3bb7b344973e122af8edbcff @mackensen mackensen committed with Sam Hemelryk Mar 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/wiki/renderer.php
View
3 mod/wiki/renderer.php
@@ -390,6 +390,9 @@ public function wiki_print_subwiki_selector($wiki, $subwiki, $page, $pagetype =
}
} else {
$group = groups_get_group($subwiki->groupid);
+ if (!$group) {
+ return;
+ }
$users = groups_get_members($subwiki->groupid);
foreach ($users as $user) {
$options[$group->id][$group->name][$group->id . '-' . $user->id] = fullname($user);

0 comments on commit 854a374

Please sign in to comment.