mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Eliminate bizarre use of function_exists.
This commit is contained in:
parent
0c6b4d2e81
commit
e1a3af61a3
@ -1997,14 +1997,7 @@
|
|||||||
foreach ($info as $category) {
|
foreach ($info as $category) {
|
||||||
//Skip empty categories (some backups can contain them)
|
//Skip empty categories (some backups can contain them)
|
||||||
if (!empty($category->id)) {
|
if (!empty($category->id)) {
|
||||||
$catrestore = "restore_question_categories";
|
$status = restore_question_categories($category,$restore);
|
||||||
if (function_exists($catrestore)) {
|
|
||||||
//print_object ($category); //Debug
|
|
||||||
$status = $catrestore($category,$restore);
|
|
||||||
} else {
|
|
||||||
//Something was wrong. Function should exist.
|
|
||||||
$status = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user