Skip to content

Commit

Permalink
Moving converters into sub-directories so they can have other files a…
Browse files Browse the repository at this point in the history
…nd simpletest directories specific to them
  • Loading branch information
polothy authored and mudrd8mz committed May 10, 2011
1 parent 8450e2c commit 5af8804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
File renamed without changes.
7 changes: 3 additions & 4 deletions backup/util/factories/convert_factory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
Expand Down

0 comments on commit 5af8804

Please sign in to comment.