Skip to content

Commit

Permalink
MDL-32341 calendar: get_file_by_hash() expects a hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese authored and ankitagarwal committed Jan 11, 2013
1 parent d63a406 commit 1c5d23e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/book/tool/importhtml/locallib.php
Expand Up @@ -54,7 +54,7 @@ function toolbook_importhtml_import_chapters($package, $type, $book, $context, $
}
if ($type == 0) {
$chapterfile = reset($chapterfiles);
if ($file = $fs->get_file_by_hash("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname")) {
if ($file = $fs->get_file_by_hash(sha1("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname"))) {
$htmlcontent = toolbook_importhtml_fix_encoding($file->get_content());
$htmlchapters = toolbook_importhtml_parse_headings(toolbook_importhtml_parse_body($htmlcontent));
// TODO: process h1 as main chapter and h2 as subchapters
Expand Down

0 comments on commit 1c5d23e

Please sign in to comment.