- for(var cp_id in this.content_providers){
- cp = this.content_providers[ cp_id ];
- if(rid.indexOf( cp_id ) != -1){
- rid = rid.replace( cp_id + '_','');
- if( cp['sObj']){
- for(var rInx in cp.sObj.resultsObj){
- if( rInx == rid )
- return cp.sObj.resultsObj[rInx];
- };
- }
- }
- }
+ js_log("looking at: " + rid);
+ p = rid.split('_');
+ var cp_id = p[0];
+ var rid = p[1];
+ if(cp_id == 'upload')
+ cp_id = 'this_wiki';
+
+ var cp = this.content_providers[cp_id];
+
+ if(cp['sObj'] && cp.sObj.resultsObj[rid]){
+ return cp.sObj.resultsObj[rid];
+ }
+