includes/external/smarty/smarty_2/Smarty.class.php | 48 +++++++++++++++-------
1 file changed, 33 insertions(+), 15 deletions(-)
diff --git a/includes/external/smarty/smarty_2/Smarty.class.php b/includes/external/smarty/smarty_2/Smarty.class.php
index 3f6a518..c2de169 100644
|
a
|
b
|
|
| 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.28 |
| | 30 | * @version 2.6.29 |
| | 31 | * Modified for xt:Commerce v3.0.4 SP2.1 (c)2009 by Hetfield - www.MerZ-IT-SerVice.de |
| 31 | 32 | */ |
| 32 | 33 | |
| 33 | 34 | /* $Id: Smarty.class.php 4660 2012-09-24 20:05:15Z uwe.tews@googlemail.com $ */ |
| … |
… |
|
| 35 | 36 | /** |
| 36 | 37 | * define smarty plugindir in template |
| 37 | 38 | */ |
| | 39 | define('MY_TEMPLATE', DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE); |
| 38 | 40 | define('MY_TEMPLATE_PLUGINS', DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/smarty'); |
| | 41 | define('MY_TEMPLATE_LANG', DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/lang'); |
| 39 | 42 | define('MY_SHOP_PLUGINS', DIR_FS_EXTERNAL.'smarty/plugins'); |
| | 43 | define('MY_MASTER_TEMPLATE', DIR_FS_CATALOG.'templates/xtc5'); |
| | 44 | define('MY_MASTER_TEMPLATE_PLUGINS', DIR_FS_CATALOG.'templates/xtc5/smarty'); |
| | 45 | define('MY_MASTER_TEMPLATE_LANG', DIR_FS_CATALOG.'templates/xtc5/lang'); |
| 40 | 46 | |
| 41 | 47 | /** |
| 42 | 48 | * DIR_SEP isn't used anymore, but third party apps might |
| … |
… |
class Smarty
|
| 78 | 84 | * |
| 79 | 85 | * @var string |
| 80 | 86 | */ |
| 81 | | var $template_dir = 'templates'; |
| | 87 | var $template_dir = array('templates', MY_TEMPLATE, MY_MASTER_TEMPLATE); |
| 82 | 88 | |
| 83 | 89 | /** |
| 84 | 90 | * The directory where compiled templates are located. |
| … |
… |
class Smarty
|
| 92 | 98 | * |
| 93 | 99 | * @var string |
| 94 | 100 | */ |
| 95 | | var $config_dir = 'lang'; |
| | 101 | var $config_dir = array('lang', MY_TEMPLATE_LANG, MY_MASTER_TEMPLATE_LANG); |
| 96 | 102 | |
| 97 | 103 | /** |
| 98 | 104 | * An array of directories searched for plugins. |
| 99 | 105 | * |
| 100 | 106 | * @var array |
| 101 | 107 | */ |
| 102 | | var $plugins_dir = array('plugins', MY_TEMPLATE_PLUGINS, MY_SHOP_PLUGINS); |
| | 108 | //var $plugins_dir = array('plugins'); |
| | 109 | var $plugins_dir = array('plugins', MY_MASTER_TEMPLATE_PLUGINS, MY_TEMPLATE_PLUGINS, MY_SHOP_PLUGINS); |
| 103 | 110 | |
| 104 | 111 | /** |
| 105 | 112 | * If debugging is enabled, a debug console window will display |
| … |
… |
class Smarty
|
| 471 | 478 | * |
| 472 | 479 | * @var string |
| 473 | 480 | */ |
| 474 | | var $_version = '2.6.28'; |
| | 481 | var $_version = '2.6.29'; |
| 475 | 482 | |
| 476 | 483 | /** |
| 477 | 484 | * current template inclusion depth |
| … |
… |
class Smarty
|
| 572 | 579 | /** |
| 573 | 580 | * The class constructor. |
| 574 | 581 | */ |
| 575 | | function Smarty() |
| | 582 | function __construct() |
| 576 | 583 | { |
| | 584 | $this->compile_dir = DIR_FS_CATALOG . $this->compile_dir; |
| | 585 | $this->config_dir[0] = DIR_FS_CATALOG . $this->config_dir[0]; |
| | 586 | if (defined('DIR_FS_LANGUAGES')) { |
| | 587 | $this->config_dir[0] = dirname(DIR_FS_LANGUAGES . '.htaccess'); |
| | 588 | } elseif (defined('DIR_WS_LANGUAGES')) { |
| | 589 | $this->config_dir[0] = dirname(DIR_WS_LANGUAGES . '.htaccess'); |
| | 590 | } |
| | 591 | $this->template_dir[0] = DIR_FS_CATALOG . $this->template_dir[0]; |
| | 592 | $this->cache_dir = DIR_FS_CATALOG . $this->cache_dir; |
| | 593 | $this->plugins_dir[0] = dirname(__FILE__) . '/' . $this->plugins_dir[0]; |
| | 594 | |
| 577 | 595 | $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] |
| 578 | 596 | : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); |
| 579 | 597 | } |
| … |
… |
class Smarty
|
| 1312 | 1330 | return; |
| 1313 | 1331 | } else { |
| 1314 | 1332 | error_reporting($_smarty_old_error_level); |
| 1315 | | if (isset($_smarty_results)) { return $_smarty_results; } |
| | 1333 | // BOF - Tomcraft - 2009-05-26 - Modified for xt:Commerce v3.0.4 SP2.1 |
| | 1334 | //if (isset($_smarty_results)) { return $_smarty_results; } |
| | 1335 | if (file_exists('includes/local/configure.php')) { |
| | 1336 | if (isset($_smarty_results)) { return '<!-- Begin: '.$resource_name.' -->'.$_smarty_results.'<!-- End: '.$resource_name.' -->'; } |
| | 1337 | } else { |
| | 1338 | if (isset($_smarty_results)) { return $_smarty_results; } |
| | 1339 | } |
| | 1340 | // EOF - Tomcraft - 2009-05-26 - Modified for xt:Commerce v3.0.4 SP2.1 |
| 1316 | 1341 | } |
| 1317 | 1342 | } |
| 1318 | 1343 | |
| … |
… |
class Smarty
|
| 1462 | 1487 | } |
| 1463 | 1488 | |
| 1464 | 1489 | |
| | 1490 | /** @var Smarty_Compiler $smarty_compiler */ |
| 1465 | 1491 | $smarty_compiler = new $this->compiler_class; |
| 1466 | 1492 | |
| 1467 | 1493 | $smarty_compiler->template_dir = $this->template_dir; |
| … |
… |
class Smarty
|
| 1547 | 1573 | else |
| 1548 | 1574 | $_params['resource_base_path'] = $this->template_dir; |
| 1549 | 1575 | |
| 1550 | | #mod |
| 1551 | | $_params['resource_base_path'] = array( |
| 1552 | | $this->template_dir, |
| 1553 | | $this->template_dir . DIRECTORY_SEPARATOR . CURRENT_TEMPLATE |
| 1554 | | ); |
| 1555 | | #mod |
| 1556 | | |
| 1557 | 1576 | if ($this->_parse_resource_name($_params)) { |
| 1558 | 1577 | $_resource_type = $_params['resource_type']; |
| 1559 | 1578 | $_resource_name = $_params['resource_name']; |
| … |
… |
class Smarty
|
| 1975 | 1994 | |
| 1976 | 1995 | /* vim: set expandtab: */ |
| 1977 | 1996 | |
| 1978 | | ?> |