MDL-34441 dbtransfer - do not attempt migration if moodle is not installed.
authorDan Poltawski <dan@moodle.com>
Wed, 25 Jul 2012 03:26:55 +0000 (11:26 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 25 Jul 2012 03:29:04 +0000 (11:29 +0800)
admin/tool/dbtransfer/cli/migrate.php

index 35b3be7..0d32e2a 100644 (file)
@@ -83,8 +83,11 @@ if ($options['help']) {
     exit(0);
 }
 
-echo "\n".get_string('cliheading', 'tool_dbtransfer')."\n\n";
+if (empty($CFG->version)) {
+    cli_error(get_string('missingconfigversion', 'debug'));
+}
 
+echo "\n".get_string('cliheading', 'tool_dbtransfer')."\n\n";
 
 $drivers = tool_dbtransfer_get_drivers();