]> git.mjollnir.org Git - moodle.git/commitdiff
Eliminate bizarre use of function_exists.
authortjhunt <tjhunt>
Tue, 13 Mar 2007 17:42:57 +0000 (17:42 +0000)
committertjhunt <tjhunt>
Tue, 13 Mar 2007 17:42:57 +0000 (17:42 +0000)
backup/restorelib.php

index 1441d90f37b3566ca73365d2b91e2e1c85f75870..855e08031d9d123cc89ff033ce69e0448cc6ab61 100644 (file)
                 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);
                     }
                 }