Changeset 1926 for branches/release-35/php/lib/block.mttags.php
- Timestamp:
- 04/16/08 10:50:21 (19 months ago)
- Files:
-
- 1 modified
-
branches/release-35/php/lib/block.mttags.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-35/php/lib/block.mttags.php
r1174 r1926 7 7 8 8 function smarty_block_mttags($args, $content, &$ctx, &$repeat) { 9 $localvars = array('_tags', 'Tag', '_tags_counter', 'tag_min_count', 'tag_max_count', 'all_tag_count', 'include_blogs', 'exclude_blogs', 'blog_ids');9 $localvars = array('_tags', 'Tag', '_tags_counter', 'tag_min_count', 'tag_max_count', 'all_tag_count', 'include_blogs', 'exclude_blogs', 'blog_ids', '__out'); 10 10 if (!isset($content)) { 11 11 $ctx->localize($localvars); … … 54 54 $ctx->stash('all_tag_count', $all_count); 55 55 $ctx->stash('_tags', $tags); 56 $ctx->stash('__out', false); 56 57 $counter = 0; 57 58 } else { 58 59 $tags = $ctx->stash('_tags'); 59 60 $counter = $ctx->stash('_tags_counter'); 61 $out = $ctx->stash('__out'); 60 62 } 61 63 … … 65 67 $ctx->stash('_tags_counter', $counter + 1); 66 68 $repeat = true; 67 if (($counter > 0) && isset($args['glue'])) { 68 $content = $content . $args['glue']; 69 if (isset($args['glue'])) { 70 if ($out && !empty($content)) 71 $content = $args['glue'] . $content; 72 if (!$out && !empty($content)) 73 $ctx->stash('__out', true); 69 74 } 70 75 } else { 76 if (isset($args['glue'])) { 77 if ($out && !empty($content)) 78 $content = $args['glue'] . $content; 79 } 71 80 $ctx->restore($localvars); 72 81 $repeat = false;
