|
Revision 1174, 0.7 kB
(checked in by bchoate, 23 months ago)
|
|
Updated copyright year for source.
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd. |
|---|
| 3 | # This program is distributed under the terms of the |
|---|
| 4 | # GNU General Public License, version 2. |
|---|
| 5 | # |
|---|
| 6 | # $Id$ |
|---|
| 7 | |
|---|
| 8 | function smarty_block_mtifarchivetypeenabled($args, $content, &$ctx, &$repeat) { |
|---|
| 9 | # status: complete |
|---|
| 10 | if (!isset($content)) { |
|---|
| 11 | $blog = $ctx->stash('blog'); |
|---|
| 12 | $at = $args['type']; |
|---|
| 13 | $at or $at = $args['archive_type']; |
|---|
| 14 | $at = preg_quote($at); |
|---|
| 15 | $blog_at = ',' . $blog['blog_archive_type'] . ','; |
|---|
| 16 | $enabled = preg_match("/,$at,/", $blog_at); |
|---|
| 17 | return $ctx->_hdlr_if($args, $content, $ctx, $repeat, $enabled); |
|---|
| 18 | } else { |
|---|
| 19 | return $ctx->_hdlr_if($args, $content, $ctx, $repeat); |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| 22 | ?> |
|---|