0byt3m1n1
Path:
/
data
/
0
/
0
/
6
/
46
/
6861
/
user
/
7034
/
cgi-bin
/
php
/
lib
/
[
Home
]
File: block.MTIfNonZero.php
<?php function smarty_block_MTIfNonZero($args, $content, &$ctx, &$repeat) { // status: complete // parameters: tag if (!isset($content)) { $ctx->localize(array('conditional', 'else_content')); $tag = $args['tag']; $tag = preg_replace('/^MT/', '', $tag); $tag = preg_replace('/[^A-Za-z0-9_]/', '', $tag); $output = $ctx->tag($tag); $ctx->stash('conditional', $output != '0'); $ctx->stash('else_content', null); } else { if (!$ctx->stash('conditional')) { $content = $ctx->stash('else_content'); } $ctx->restore(array('conditional', 'else_content')); } return $content; } ?>