~ubuntu-branches/ubuntu/dapper/smarty/dapper-updates

« back to all changes in this revision

Viewing changes to libs/Smarty.class.php

  • Committer: Bazaar Package Importer
  • Author(s): Igor Genibel
  • Date: 2006-01-12 11:21:13 UTC
  • mfrom: (0.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060112112113-jnj3qjevq3otksra
Tags: 2.6.11-1
* New upstream release
* Added myself to Uploaders
* Ack previous NMU (Closes: #332098)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 * @author Monte Ohrt <monte at ohrt dot com>
28
28
 * @author Andrei Zmievski <andrei@php.net>
29
29
 * @package Smarty
30
 
 * @version 2.6.10
 
30
 * @version 2.6.11
31
31
 */
32
32
 
33
 
/* $Id: Smarty.class.php,v 1.516 2005/07/18 08:43:53 messju Exp $ */
 
33
/* $Id: Smarty.class.php,v 1.521 2005/11/23 20:36:03 boots Exp $ */
34
34
 
35
35
/**
36
36
 * DIR_SEP isn't used anymore, but third party apps might
464
464
     *
465
465
     * @var string
466
466
     */
467
 
    var $_version              = '2.6.10';
 
467
    var $_version              = '2.6.11';
468
468
 
469
469
    /**
470
470
     * current template inclusion depth
1055
1055
    {
1056
1056
        if(!isset($name)) {
1057
1057
            return $this->_tpl_vars;
1058
 
        }
1059
 
        if(isset($this->_tpl_vars[$name])) {
 
1058
        } elseif(isset($this->_tpl_vars[$name])) {
1060
1059
            return $this->_tpl_vars[$name];
 
1060
        } else {
 
1061
            // var non-existant, return valid reference
 
1062
            $_tmp = null;
 
1063
            return $_tmp;   
1061
1064
        }
1062
1065
    }
1063
1066
 
1074
1077
            return $this->_config[0]['vars'];
1075
1078
        } else if(isset($this->_config[0]['vars'][$name])) {
1076
1079
            return $this->_config[0]['vars'][$name];
 
1080
        } else {
 
1081
            // var non-existant, return valid reference
 
1082
            $_tmp = null;
 
1083
            return $_tmp;
1077
1084
        }
1078
1085
    }
1079
1086
 
1691
1698
     */
1692
1699
    function _dequote($string)
1693
1700
    {
1694
 
        if (($string{0} == "'" || $string{0} == '"') &&
1695
 
            $string{strlen($string)-1} == $string{0})
 
1701
        if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') &&
 
1702
            substr($string, -1) == substr($string, 0, 1))
1696
1703
            return substr($string, 1, -1);
1697
1704
        else
1698
1705
            return $string;