Changeset 2057

Show
Ignore:
Timestamp:
04/24/08 21:16:00 (19 months ago)
Author:
bchoate
Message:

Adding meta support for comments/pings and creating a new index to aid selecting by parent object and visible status. Also, comment author method now returns MT::Author nickname when comment has an associated author. BugId:79475

Location:
branches/release-36
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/release-36/build/mt-dists/default.mk

    r2049 r2057  
    22 
    33PRODUCT_VERSION = 4.15 
    4 SCHEMA_VERSION = 4.0059 
     4SCHEMA_VERSION = 4.0060 
    55API_VERSION = 4.15 
    66 
  • branches/release-36/lib/MT/Comment.pm

    r1866 r2057  
    3535        ip => 1, 
    3636        created_on => 1, 
    37         entry_id => 1, 
     37        entry_visible => { 
     38            columns => [ 'entry_id', 'visible' ], 
     39        }, 
    3840        email => 1, 
    3941        commenter_id => 1, 
     
    5759        }, 
    5860    }, 
     61    meta => 1, 
    5962    defaults => { 
    6063        junk_status => NOT_JUNK, 
     
    196199 
    197200*publish = \&approve; 
     201 
     202sub author { 
     203    my $comment = shift; 
     204    if (!@_ && $comment->commenter_id) { 
     205        require MT::Author; 
     206        if (my $auth = MT::Author->load($comment->commenter_id)) { 
     207            return $auth->nickname; 
     208        } 
     209    } 
     210    return $comment->column('author', @_); 
     211} 
    198212 
    199213sub all_text { 
  • branches/release-36/lib/MT/TBPing.pm

    r1866 r2057  
    3131    indexes => { 
    3232        created_on => 1, 
    33         tb_id => 1, 
     33        tb_visible => { 
     34            columns => [ 'tb_id', 'visible' ], 
     35        }, 
    3436        ip => 1, 
    3537        last_moved_on => 1, # used for junk expiration 
     
    5658    }, 
    5759    audit => 1, 
     60    meta => 1, 
    5861    datasource => 'tbping', 
    5962    primary_key => 'id',