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/CMS/Tag.pm

    r1823 r1873  
    110110    if ( $tag && $blog_id ) { 
    111111        my $ot_class = $app->model('objecttag'); 
    112         my $count    = $ot_class->count( 
     112        my $exist    = $ot_class->exist( 
    113113            { 
    114114                object_datasource => $class->datasource, 
     
    117117            } 
    118118        ); 
    119         undef $tag unless $count; 
     119        undef $tag unless $exist; 
    120120    } 
    121121    return $app->json_result( { exists => $tag ? 'true' : 'false' } );