Remove unused require_once, die if touch fails
This commit is contained in:
parent
4f62900be1
commit
d44854e07b
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
require_once("../../config.php");
|
||||
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
|
||||
|
||||
if (! function_exists('str_ends_with')) {
|
||||
function str_ends_with(string $haystack, string $needle): bool
|
||||
|
@ -24,4 +23,6 @@ if (!has_capability('local/replication:replicate', $context)) {
|
|||
die("User not allowed to trigger replication!");
|
||||
}
|
||||
|
||||
touch($directory . $id . "-" . $course->category . ".mew");
|
||||
if (!touch($directory . $id . "-" . $course->category . ".mew")) {
|
||||
die("Could not touch $directory$id-{$course->category}.mew");
|
||||
}
|
Loading…
Reference in a new issue