improved coding style of last commit
authorPetr Skoda <skodak@moodle.org>
Mon, 18 Oct 2010 11:43:09 +0000 (11:43 +0000)
committerPetr Skoda <skodak@moodle.org>
Mon, 18 Oct 2010 11:43:09 +0000 (11:43 +0000)
mod/resource/lib.php

index b368947..a15b55f 100644 (file)
@@ -389,7 +389,7 @@ function resource_pluginfile($course, $cm, $context, $filearea, $args, $forcedow
     $fullpath = rtrim("/$context->id/mod_resource/$filearea/0/$relativepath", '/');
     do {
         if (!$file = $fs->get_file_by_hash(sha1($fullpath))) {
-            if ($file = $fs->get_file_by_hash(sha1("$fullpath/.")) and $file->is_directory()) {
+            if ($fs->get_file_by_hash(sha1("$fullpath/."))) {
                 if ($file = $fs->get_file_by_hash(sha1("$fullpath/index.htm"))) {
                     break;
                 }