Changeset 1926 for branches/release-35/php/lib/block.mtassettags.php
- Timestamp:
- 04/16/08 10:50:21 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-35/php/lib/block.mtassettags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-35/php/lib/block.mtassettags.php
r1174 r1926 7 7 8 8 function smarty_block_mtassettags($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 $ctx->localize($localvars); … … 32 32 if (!is_array($tags)) $tags = array(); 33 33 $ctx->stash('_tags', $tags); 34 $ctx->stash('__out', false); 34 35 35 36 $counter = 0; … … 37 38 $tags = $ctx->stash('_tags'); 38 39 $counter = $ctx->stash('_tags_counter'); 40 $out = $ctx->stash('__out'); 39 41 } 40 42 if ($counter < count($tags)) { … … 43 45 $ctx->stash('_tags_counter', $counter + 1); 44 46 $repeat = true; 45 if (($counter > 0) && isset($args['glue'])) { 46 $content = $content . $args['glue']; 47 if (isset($args['glue']) && !empty($content)) { 48 if ($out) 49 $content = $args['glue'] . $content; 50 else 51 $ctx->stash('__out', true); 47 52 } 48 53 } else { 54 if (isset($args['glue']) && $out && !empty($content)) 55 $content = $args['glue'] . $content; 49 56 $ctx->restore($localvars); 50 57 $repeat = false;
