Changeset 1170
- Timestamp:
- 06/26/07 10:49:03 (1 year ago)
- Files:
-
- devel/mod/generic_comments/lib.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/generic_comments/lib.php
r1168 r1170 45 45 if ($object_type == 'file::file') 46 46 return file_get_friendly_name($object_type, $object_id); 47 48 if ($object_type == 'mediastream::media') 49 return mediastream_get_friendly_name($object_type, $object_id); 47 50 48 51 return ""; … … 53 56 $return = ""; 54 57 55 if ( $object_type == "file::file")58 if (($object_type == "file::file") || ($object_type == "mediastream::media")) 56 59 { 57 60 $txt = __gettext('Click to add or view comments on this file.'); 58 $int = implode('',action('annotate',$object->ident, 'file::file',NULL,61 $int = implode('',action('annotate',$object->ident,$object_type,NULL, 59 62 array('comment_form_type'=>'inline', 'comment_sort'=>'DESC', 'comment_form_text'=>$txt))); 60 63 … … 67 70 <noscript> 68 71 END; 69 $return .= implode('',action('annotate',$object->ident, 'file::file',NULL,72 $return .= implode('',action('annotate',$object->ident,$object_type,NULL, 70 73 array('comment_form_type'=>'summary', 'comment_sort'=>'DESC', 'comment_form_text'=>$txt))); 71 74 … … 448 451 $table = 'weblog_posts'; 449 452 break; 453 case 'mediastream::media': 454 $table = 'mediastream_objects'; 455 break; 450 456 default: 451 457 // this table does not exist (yet) … … 480 486 $table = 'weblog_posts'; 481 487 break; 488 case 'mediastream::media': 489 $table = 'mediastream_objects'; 490 break; 482 491 default: 483 492 // this table does not exist (yet) … … 510 519 case 'blog::weblog': 511 520 $title = get_field('weblog_posts','title','ident',$object_id); 521 break; 522 case 'mediastream::media': 523 $title = get_field('mediastream_objects','name','ident',$object_id); 512 524 break; 513 525 case 'profile::profile': … … 555 567 $username = user_info('username',$object_record->weblog); 556 568 $url = $CFG->wwwroot.$username.'/weblog/'.$object_record->ident.'.html'; 569 break; 570 case 'mediastream::media': 571 $object_record = get_record('mediastream_objects','ident',$object_id); 572 $username = user_info('username',$object_record->owner); 573 $url = $CFG->wwwroot."/mod/mediastream/display.php?ident={$object_record->ident}&owner={$object_record->owner}&media={$object_record->mediatype}"; 557 574 break; 558 575 case 'profile::profile':
