Changeset 2450

Show
Ignore:
Timestamp:
05/28/08 07:11:02 (21 months ago)
Author:
takayama
Message:

Fixed BugId:79904
* Changed to use MTCommentLink
* Added support for filtering of no class to fetch_entries

Location:
branches/release-39
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/default_templates/recent_comments.mtml

    r2394 r2450  
    77        <ul class="recent-comments-list"> 
    88        </mt:CommentsHeader> 
    9             <li><__trans phrase="<a href="[_1]">[_2] commented on [_3]</a>: [_4]" params="<mt:CommentEntry><$mt:EntryPermalink$></mt:CommentEntry>#comment-<$mt:CommentID$>%%<$mt:CommentAuthor$>%%<mt:CommentEntry><$mt:EntryTitle$></mt:CommentEntry>%%<$mt:CommentBody remove_html="1" trim_to="10"$>"></li> 
     9            <li><__trans phrase="<a href="[_1]">[_2] commented on [_3]</a>: [_4]" params="<$mt:CommentLink$>%%<$mt:CommentAuthor$>%%<mt:CommentEntry><$mt:EntryTitle$></mt:CommentEntry>%%<$mt:CommentBody remove_html="1" trim_to="10"$>"></li> 
    1010        <mt:CommentsFooter> 
    1111        </ul> 
  • branches/release-39/php/lib/function.mtcommentlink.php

    r2366 r2450  
    1212    $need_clear = false; 
    1313    if (empty($e)) { 
    14         $e = $ctx->mt->db->fetch_entry($c['comment_entry_id']); 
     14        $entries = $ctx->mt->db->fetch_entries( 
     15            array('entry_id' => $c['comment_entry_id'], 'class' => '*')); 
     16        $e = $entries[0]; 
    1517        $ctx->stash('entry', $e); 
    1618        $need_clear = true; 
    1719    } 
    18     $entry_link = $ctx->tag('EntryPermalink', $args); 
     20    if (empty($e)) return ''; 
     21    $entry_link = $ctx->tag($e['entry_class'].'Permalink', $args); 
    1922    $entry_link .= '#comment-' . $c['comment_id']; 
    2023 
  • branches/release-39/php/lib/mtdb_base.php

    r2326 r2450  
    749749        } 
    750750        $class_filter = "and entry_class='$class'"; 
     751        if ($args['class'] == '*') $class_filter = ''; 
    751752         
    752753        $join_score = "";