Show
Ignore:
Timestamp:
04/13/08 04:41:46 (20 months ago)
Author:
bchoate
Message:

Applied patches from Ogawa-san to add an optimized 'exist' method for testing for existing rows. BugId:69661

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-34/lib/MT/Util.pm

    r1823 r1873  
    936936 
    937937    my $class = ref $entry;  
    938     while ($class->count({ blog_id => $blog->id, 
     938    while ($class->exist({ blog_id => $blog->id, 
    939939                           basename => $base })) { 
    940940        $base = $base_copy . '_' . $i++; 
     
    962962 
    963963    my $cat_class = ref $cat; 
    964     while ($cat_class->count({ blog_id => $cat->blog_id, 
     964    while ($cat_class->exist({ blog_id => $cat->blog_id, 
    965965                               basename => $base })) { 
    966966        $base = $base_copy . '_' . $i++; 
     
    982982 
    983983    my $author_class = ref $author; 
    984     while ($author_class->count({ basename => $base })) { 
     984    while ($author_class->exist({ basename => $base })) { 
    985985        $base = $base_copy . '_' . $i++; 
    986986    }