Skip to content

Commit

Permalink
Fixed BugId:66788
Browse files Browse the repository at this point in the history
* Fixed to work MTPages.
  • Loading branch information
Yuji Takayama committed Jan 21, 2008
1 parent 094f6a2 commit bf66400
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion php/lib/block.mtentries.php
Expand Up @@ -60,7 +60,7 @@ function smarty_block_mtentries($args, $content, &$ctx, &$repeat) {
($args['limit'] || $args['lastn']) or $args['lastn'] = -1;
$archiver->setup_args($ctx, $args);
}
if (($cat = $ctx->stash('category')) && $args['class'] == 'entry') {
if (($cat = $ctx->stash('category')) && ($args['class'] == 'entry' || $args['class'] == 'page')) {
$args['category'] or $args['categories'] or $args['category_id'] = $cat['category_id'];
if ($ctx->stash('inside_mt_categories')) {
$args['category_id'] = $cat['category_id'];
Expand Down
3 changes: 2 additions & 1 deletion php/lib/block.mtfolderfooter.php
Expand Up @@ -9,8 +9,9 @@ function smarty_block_mtfolderfooter($args, $content, &$ctx, &$repeat) {
if (!isset($content)) {
$categories =& $ctx->stash('_categories');
$counter = $ctx->stash('_categories_counter');

return $ctx->_hdlr_if($args, $content, $ctx, $repeat,
($counter == count($categories) || $ctx->stash('subFolderFoot'))
((isset($counter) && isset($categories)) && $counter == count($categories) || $ctx->stash('subFolderFoot'))
);
} else {
return $ctx->_hdlr_if($args, $content, $ctx, $repeat);
Expand Down
2 changes: 1 addition & 1 deletion php/lib/function.mtsubcatsrecurse.php
Expand Up @@ -6,7 +6,7 @@
# $Id$

function smarty_function_mtsubcatsrecurse($args, &$ctx) {
$localvars = array('subCatsDepth', 'category', 'subCatIsFirst', 'subCatIsLast');
$localvars = array('subCatsDepth', 'category', 'subCatIsFirst', 'subCatIsLast', 'subFolderHead', 'subFolderFoot');
$fn = $ctx->stash('subCatTokens');
#if (!method_exists($ctx,$fn)) {
# return $ctx->error("Called SubCatsRecurse outside of SubCategories tag!");
Expand Down

0 comments on commit bf66400

Please sign in to comment.