Permalink
Browse files

Moving converters into sub-directories so they can have other files a…

…nd simpletest directories specific to them
  • Loading branch information...
1 parent 8450e2c commit 5af88044155dd6ea9f2512ca758daa2f98b341cb @mrmark mrmark committed with mudrd8mz Mar 11, 2011
@@ -13,7 +13,7 @@ public static function converter($name, $tempdir) {
$name = clean_param($name, PARAM_SAFEDIR);
- $classfile = "$CFG->dirroot/backup/converter/$name.class.php";
+ $classfile = "$CFG->dirroot/backup/converter/$name/converter.class.php";
$classname = "{$name}_converter";
if (!file_exists($classfile)) {
@@ -36,9 +36,8 @@ public static function converters($tempdir) {
global $CFG;
$converters = array();
- $files = get_directory_list($CFG->dirroot.'/backup/converter');
- foreach ($files as $file) {
- $name = array_shift(explode('_', $file));
+ $plugins = get_list_of_plugins('backup/converter');
+ foreach ($plugins as $name) {
$converters[$name] = self::converter($name, $tempdir);
}
return $converters;

0 comments on commit 5af8804

Please sign in to comment.