adding a TODO highlighting bad api design
authorPetr Skoda <skodak@moodle.org>
Fri, 3 Sep 2010 18:58:04 +0000 (18:58 +0000)
committerPetr Skoda <skodak@moodle.org>
Fri, 3 Sep 2010 18:58:04 +0000 (18:58 +0000)
repository/repository_ajax.php

index 7dd1ca9..7939679 100755 (executable)
@@ -194,7 +194,7 @@ switch ($action) {
             echo json_encode($info);
             die;
         } else {
-            if (in_array($repo->options['type'], array('local', 'recent', 'user', 'coursefiles'))) {
+            if (in_array($repo->options['type'], array('local', 'recent', 'user', 'coursefiles'))) { //TODO: this hardcoding is a really ugly hack (skodak)
                 $fileinfo = $repo->copy_to_area($source, $itemid, $saveas_path, $saveas_filename);
                 $info = array();
                 $info['file'] = $fileinfo['title'];