MDL-19342 - small fixes from Tatsuva Shirai + UTF-8 global straighten up

This commit is contained in:
diml
2009-05-30 22:16:28 +00:00
parent 902ec3ccc2
commit 29dc93d1cd
14 changed files with 112 additions and 27 deletions
+3 -2
View File
@@ -6,6 +6,7 @@
* @category core
* @subpackage document_wrappers
* @author Michael Campanis (mchampan) [[email protected]], Valery Fremaux [[email protected]] > 1.8
* @contributor Tatsuva Shirai 20090530
* @date 2008/03/31
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*
@@ -245,8 +246,8 @@ function wiki_check_text_access($path, $itemtype, $this_id, $user, $group_id, $c
$course = get_record('course', 'id', $entry->course);
$context = get_record('context', 'id', $context_id);
$cm = get_record('course_modules', 'id', $context->instanceid);
// $cm = get_coursemodule_from_instance('wiki', $wiki->id, $wiki->course);
// $context = get_record('context', 'id', $cm->id);
if (empty($cm)) return false; // Shirai 20090530 - MDL19342 - course module might have been delete
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', $context)) {
if (!empty($CFG->search_access_debug)) echo "search reject : hidden wiki ";
return false;