Permalink
Browse files

Fixing problems like in [MDL-22352].

  • Loading branch information...
1 parent 3ca72eb commit d56a4dc5f5a2f309e0f10532e2ecd4f7bf730bd2 Jordi Piguillem committed May 14, 2010
Showing with 9 additions and 3 deletions.
  1. +3 −1 mod/wiki/renderer.php
  2. +3 −1 mod/wiki/search.php
  3. +3 −1 mod/wiki/view.php
View
@@ -35,7 +35,9 @@ public function page_index() {
}
// @TODO: Fix call to wiki_get_subwiki_by_group
- $gid = groups_get_activity_group($this->page->cm);
+ if ($gid = groups_get_activity_group($this->page->cm)){
+ $gid = 0;
+ }
if (!$subwiki = wiki_get_subwiki_by_group($this->page->cm->instance, $gid)) {
return false;
}
View
@@ -41,7 +41,9 @@
require_course_login($course, true, $cm);
// @TODO: Fix call to wiki_get_subwiki_by_group
-$gid = groups_get_activity_group($cm);
+if (!$gid = groups_get_activity_group($cm)){
+ $gid = 0;
+}
if (!$subwiki = wiki_get_subwiki_by_group($cm->instance, $gid)){
return false;
}
View
@@ -241,7 +241,9 @@
// Checking subwiki instance
// @TODO: Fix call to wiki_get_subwiki_by_group
- $currentgroup = groups_get_activity_group($cm);
+ if (!$currentgroup = groups_get_activity_group($cm)){
+ $currentgroup = 0;
+ }
if (!$subwiki = wiki_get_subwiki_by_group($wid, $currentgroup)) {
print_error('incorrectsubwikiid', 'wiki');
}

0 comments on commit d56a4dc

Please sign in to comment.