root/trunk/php/lib/modifier.setvar.php
@
3082
| Revision 3082, 488 bytes (checked in by bchoate, 14 months ago) |
|---|
| 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_modifier_setvar($text, $name) { |
| 9 | global $mt; |
| 10 | $ctx =& $mt->context(); |
| 11 | if (array_key_exists('__inside_set_hashvar', $ctx->__stash)) { |
| 12 | $vars =& $ctx->__stash['__inside_set_hashvar']; |
| 13 | } else { |
| 14 | $vars =& $ctx->__stash['vars']; |
| 15 | } |
| 16 | $vars[$name] = $text; |
| 17 | return ''; |
| 18 | } |
Note: See TracBrowser
for help on using the browser.
