root/trunk/php/lib/modifier.setvar.php @ 3082

Revision 3082, 488 bytes (checked in by bchoate, 14 months ago)

Merging fireball branch changes to-date to trunk: svn merge -r2974:3081 http://code.sixapart.com/svn/movabletype/branches/fireball .

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
8function 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.