~ubuntu-branches/debian/squeeze/movabletype-opensource/squeeze

« back to all changes in this revision

Viewing changes to lib/MT/Template/Context.pm

  • Committer: Bazaar Package Importer
  • Author(s): Dominic Hargreaves
  • Date: 2009-10-06 22:09:27 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091006220927-qusoqt9vtm3fgtgr
Tags: 4.3.2-1
New upstream release (closes: #544206)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# This program is distributed under the terms of the
3
3
# GNU General Public License, version 2.
4
4
#
5
 
# $Id: Context.pm 3525 2009-03-11 12:49:14Z fumiakiy $
 
5
# $Id: Context.pm 4037 2009-07-21 13:41:49Z plim $
6
6
 
7
7
package MT::Template::Context;
8
8
 
263
263
                if (ref $code eq 'HASH') {
264
264
                    $code = $code->{code} ||= MT->handler_to_coderef($code->{handler});
265
265
                }
 
266
                elsif (defined $code and ! ref $code) {
 
267
                    $code = MT->handler_to_coderef($code);
 
268
                }
266
269
                $str = $code->($str, $val, $ctx);
267
270
            }
268
271
        }