Changeset 1926 for branches/release-35/php/lib/block.mtentries.php
- Timestamp:
- 04/16/08 10:50:21 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-35/php/lib/block.mtentries.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-35/php/lib/block.mtentries.php
r1335 r1926 7 7 8 8 function smarty_block_mtentries($args, $content, &$ctx, &$repeat) { 9 $localvars = array('entry', '_entries_counter','entries','current_timestamp','modification_timestamp','_entries_lastn', 'current_timestamp_end', 'DateHeader', 'DateFooter', '_entries_glue', 'blog', 'blog_id', 'conditional', 'else_content' );9 $localvars = array('entry', '_entries_counter','entries','current_timestamp','modification_timestamp','_entries_lastn', 'current_timestamp_end', 'DateHeader', 'DateFooter', '_entries_glue', 'blog', 'blog_id', 'conditional', 'else_content', '__out'); 10 10 if (isset($args['sort_by']) && $args['sort_by'] == 'score' && !isset($args['namespace'])) { 11 11 return $ctx->error($ctx->mt->translate('sort_by="score" must be used in combination with namespace.')); … … 29 29 $lastn = $args['lastn']; 30 30 $ctx->stash('_entries_lastn', $lastn); 31 $ctx->stash('__out', false); 31 32 } else { 32 33 $lastn = $ctx->stash('_entries_lastn'); 33 34 $counter = $ctx->stash('_entries_counter'); 35 $out = $ctx->stash('__out'); 34 36 } 35 37 if (!isset($args['class'])) { … … 119 121 $_REQUEST['entry_ids_published'][$entry['entry_id']] = 1; 120 122 $glue = $ctx->stash('_entries_glue'); 121 if ($glue != '') $content = $content . $glue; 123 if (isset($glue) && !empty($content)) { 124 if ($out) 125 $content = $glue . $content; 126 else 127 $ctx->stash('__out', true); 128 } 122 129 $repeat = true; 123 130 } else { 131 $glue = $ctx->stash('_entries_glue'); 132 if (isset($glue) && $out && !empty($content)) 133 $content = $glue . $content; 124 134 $ctx->restore($localvars); 125 135 $repeat = false;
