ToutPratique 1d1a2def5f push prod
2016-05-17 15:54:37 +02:00

69 lines
1.8 KiB
PHP

<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
// Retro 1.3, 'class_exists' cause problem with autoload...
if (version_compare(_PS_VERSION_, '1.4.0.2', '<') && !in_array('FrontController', get_declared_classes()))
{
// Not exist for 1.3
class FrontController
{
public $template;
public function __construct()
{
}
public function displayContent()
{
Tools::safePostVars();
self::$smarty->assign('errors', $this->errors);
}
}
}
/**
* Class allow to display tpl on the FO
*/
class BWDisplay extends FrontController
{
// Assign template, on 1.4 create it else assign for 1.5
public function setTemplate($template)
{
if (_PS_VERSION_ >= '1.5')
parent::setTemplate($template);
else
$this->template = $template;
}
// Overload displayContent for 1.4
public function displayContent()
{
parent::displayContent();
echo Context::getContext()->smarty->fetch($this->template);
}
}