Changeset 2202

Show
Ignore:
Timestamp:
05/02/08 18:35:14 (23 months ago)
Author:
fumiakiy
Message:

Removed the reference to a private method in MT::Object from MT::OD::DBI. Use the trigger instead, just like other methods in it are doing. BugId:79569

Location:
branches/release-37/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-37/lib/MT/Object.pm

    r2148 r2202  
    275275        or return; 
    276276    if (ref $terms eq 'HASH') { 
     277        my $no_class = 0; 
     278        if ($args->{no_class}) { 
     279            delete $args->{no_class}; 
     280            $no_class = 1; 
     281        } 
    277282        if (exists $terms->{$col}) { 
    278             if ($terms->{$col} eq '*') { 
     283            if ( ( $terms->{$col} eq '*' ) || $no_class ) { 
    279284                # class term is '*', which signifies filtering for all classes. 
    280285                # simply delete the term in this case. 
     
    289294            return; 
    290295        } 
    291         $terms->{$col} = $props->{class_type}; 
     296        $terms->{$col} = $props->{class_type} 
     297            unless $no_class; 
    292298    } 
    293299    elsif (ref $terms eq 'ARRAY') { 
  • branches/release-37/lib/MT/ObjectDriver/Driver/DBI.pm

    r2156 r2202  
    122122    my ($agg_func, $class, $terms, $args) = @_; 
    123123    my $props = $class->properties; 
    124     if ($args->{no_class}) { 
    125         delete $terms->{$props->{class_column}}; 
    126         delete $args->{no_class}; 
    127     } 
    128     else { 
    129         $class->_pre_search_scope_terms_to_class( $terms, $args ); 
    130     } 
     124    $class->call_trigger('pre_search', $terms, $args); 
    131125    my $order = delete $args->{sort}; 
    132126    my $direction = delete $args->{direction};