MDL-31000 Added comment about the importance of repository array keys

This commit is contained in:
Sam Hemelryk
2012-01-10 12:27:38 +13:00
parent 7984be4a13
commit 7e9f29178e
+2
View File
@@ -2146,6 +2146,8 @@ function initialise_filepicker($args) {
$return->return_types = $args->return_types;
foreach ($repositories as $repository) {
$meta = $repository->get_meta();
// Please note that the array keys for repositories are used within
// JavaScript a lot, the key NEEDS to be the repository id.
$return->repositories[$repository->id] = $meta;
}
return $return;