]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-13766, fix repository id in thumbnail view"
authordongsheng <dongsheng>
Mon, 8 Sep 2008 07:51:07 +0000 (07:51 +0000)
committerdongsheng <dongsheng>
Mon, 8 Sep 2008 07:51:07 +0000 (07:51 +0000)
repository/lib.php

index 551d4bbbe44cf7a733ee03ce13039a57b333e72b..76562f8abd4493c1933a133ad6eac02e84df803c 100644 (file)
@@ -1551,7 +1551,11 @@ _client.viewthumb = function(ds){
             el.title = list[k].title;
             el.value = list[k].source;
             el.icon  = list[k].thumbnail;
-            el.repo_id = list[k].repo_id;
+            if(list[k].repo_id){
+                el.repo_id = list[k].repo_id;
+            }else{
+                el.repo_id = _client.repositoryid;
+            }
             el.on('click', function(){
                 repository_client_$suffix.rename(this.title, this.value, this.icon, this.repo_id);
             });