Permalink
Browse files

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

  • Loading branch information...
1 parent 7984be4 commit 7e9f29178ebc8ffe8e76385a18ca619f6d041c77 Sam Hemelryk committed Jan 9, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 repository/lib.php
View
@@ -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;

0 comments on commit 7e9f291

Please sign in to comment.