From 8164a2b5498fc55e965329afc6d80f603a7e9263 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 4 Dec 2013 20:54:57 +1300 Subject: [PATCH] MDL-43192 Repository: param doesn't exist - should use function --- repository/filesystem/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/filesystem/lib.php b/repository/filesystem/lib.php index 8d43b199c7a..fd6f5723e50 100644 --- a/repository/filesystem/lib.php +++ b/repository/filesystem/lib.php @@ -572,10 +572,10 @@ class repository_filesystem extends repository { $filename = $mainfile->get_filename(); $basepath = strstr($mainfilepath, $filename, true); - $fullrelativefilepath = realpath($this->root_path.$basepath.$relativepath); + $fullrelativefilepath = realpath($this->get_rootpath().$basepath.$relativepath); // Sanity check to make sure this path is inside this repository and the file exists. - if (strpos($fullrelativefilepath, $this->root_path) === 0 && file_exists($fullrelativefilepath)) { + if (strpos($fullrelativefilepath, $this->get_rootpath()) === 0 && file_exists($fullrelativefilepath)) { send_file($fullrelativefilepath, basename($relativepath), null, 0); } }