mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Issue #390: Code cleanup to fix code standards codesniffer errors.
This commit is contained in:
4
lib.php
4
lib.php
@@ -48,7 +48,7 @@ function auth_outage_get_climaintenance_resource_file($file) {
|
||||
// We are not using any external libraries or references in this file (we have not gully loaded config.php yet).
|
||||
// If you change the path below maybe you need to change maintenance_static_page::get_resources_folder() as well.
|
||||
$resourcedir = rtrim($CFG->dataroot, '/'); // In case the configuration has a trailing slash.
|
||||
$resourcedir = $resourcedir.'/auth_outage/climaintenance';
|
||||
$resourcedir = $resourcedir . '/auth_outage/climaintenance';
|
||||
|
||||
// Protect against path traversal attacks.
|
||||
$basename = basename($file);
|
||||
@@ -61,7 +61,7 @@ function auth_outage_get_climaintenance_resource_file($file) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$realpath = realpath($resourcedir.'/'.$file);
|
||||
$realpath = realpath($resourcedir . '/' . $file);
|
||||
return ($realpath == false) ? null : $realpath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user