Show
Ignore:
Timestamp:
04/17/08 21:48:11 (20 months ago)
Author:
bchoate
Message:

Added support for phrases on count tags. BugId:79359

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-35/php/lib/function.mtarchivecount.php

    r1766 r1956  
    1414        $archiver = $_archivers[$at]; 
    1515    } 
     16    $count = 0; 
    1617    if ((!isset($archiver) && $ctx->stash('inside_mt_categories')) || 
    1718        ($ctx->stash('inside_mt_categories') && !$archiver->is_date_based())) { 
    1819        return $ctx->tag('MTCategoryCount', $args); 
    1920    } elseif ($count = $ctx->stash('archive_count')) { 
    20         return $count; 
     21        # $count is set 
    2122    } elseif ($entries = $ctx->stash('entries')) { 
    22         return count($entries); 
     23        $count = count($entries); 
    2324    } else { 
    2425        $eargs = array(); 
     
    3839            $eargs['lastn'] = -1; 
    3940            $entries =& $ctx->mt->db->fetch_entries($eargs); 
    40             return count($entries); 
     41            $count = count($entries); 
    4142        } 
    4243    } 
    43     return 0; 
     44    $ctx->count_format($count, $args); 
    4445} 
    45 ?>