From: tjhunt Date: Tue, 13 Mar 2007 17:42:57 +0000 (+0000) Subject: Eliminate bizarre use of function_exists. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e1a3af61a338efc3480afe440937ed1fe204174b;p=moodle.git Eliminate bizarre use of function_exists. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 1441d90f37..855e08031d 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1997,14 +1997,7 @@ foreach ($info as $category) { //Skip empty categories (some backups can contain them) if (!empty($category->id)) { - $catrestore = "restore_question_categories"; - if (function_exists($catrestore)) { - //print_object ($category); //Debug - $status = $catrestore($category,$restore); - } else { - //Something was wrong. Function should exist. - $status = false; - } + $status = restore_question_categories($category,$restore); } }