improved coding style of last commit

This commit is contained in:
Petr Skoda 2010-10-18 11:43:09 +00:00
parent fe3c5daede
commit 9815cceee8

View 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;
}