Changeset 1926 for branches/release-35/php/lib/block.mtentrytags.php
- Timestamp:
- 04/16/08 10:50:21 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-35/php/lib/block.mtentrytags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-35/php/lib/block.mtentrytags.php
r1174 r1926 7 7 8 8 function smarty_block_mtentrytags($args, $content, &$ctx, &$repeat) { 9 $localvars = array('_tags', 'Tag', '_tags_counter', 'tag_min_count', 'tag_max_count','all_tag_count' );9 $localvars = array('_tags', 'Tag', '_tags_counter', 'tag_min_count', 'tag_max_count','all_tag_count', '__out'); 10 10 if (!isset($content)) { 11 11 $class = 'entry'; … … 37 37 if (!is_array($tags)) $tags = array(); 38 38 $ctx->stash('_tags', $tags); 39 $ctx->stash('__out', false); 39 40 40 41 $counter = 0; … … 42 43 $tags = $ctx->stash('_tags'); 43 44 $counter = $ctx->stash('_tags_counter'); 45 $out = $ctx->stash('__out'); 44 46 } 45 47 if ($counter < count($tags)) { … … 48 50 $ctx->stash('_tags_counter', $counter + 1); 49 51 $repeat = true; 50 if (($counter > 0) && isset($args['glue'])) { 51 $content = $content . $args['glue']; 52 if (isset($args['glue']) && !empty($content)) { 53 if ($out) 54 $content = $args['glue']. $content; 55 else 56 $ctx->stash('__out', true); 52 57 } 53 58 } else { 59 if (isset($args['glue']) && $out && !empty($content)) 60 $content = $args['glue']. $content; 54 61 $ctx->restore($localvars); 55 62 $repeat = false;
