From: stronk7 Date: Thu, 12 Jun 2003 15:33:25 +0000 (+0000) Subject: Added backup_required_functions to pre-check required functions in X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fe3c84ab466c7b83bd96ddfde0da89f95dde9ef7;p=moodle.git Added backup_required_functions to pre-check required functions in backup/restore process. --- diff --git a/backup/lib.php b/backup/lib.php index 8df4721259..4e83c0db7e 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -355,4 +355,16 @@ return addslashes(utf8_decode($data)); } + //This function is used to check that every necessary function to + //backup/restore exists in the current php installation. Thanks to + //gregb@crowncollege.edu by the idea. + function backup_required_functions() { + + if(!function_exists('utf8_encodes') { + error('You need to add utf8 support to your PHP installation'); + } + + } + + ?>