[*] Project : Version 2 of Smarty has been removed for using only version 3

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8569 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-09-14 13:27:32 +00:00
parent e5703a3d69
commit b3d60e169b
89 changed files with 19 additions and 9888 deletions
+2 -19
View File
@@ -998,11 +998,6 @@ abstract class Module
{
global $smarty;
if (Configuration::get('PS_FORCE_SMARTY_2')) /* Keep a backward compatibility for Smarty v2 */
{
$previousTemplate = $smarty->currentTemplate;
$smarty->currentTemplate = substr(basename($template), 0, -4);
}
$smarty->assign('module_dir', __PS_BASE_URI__.'modules/'.basename($file, '.php').'/');
if (($overloaded = self::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === NULL)
$result = Tools::displayError('No template found for module').' '.basename($file,'.php');
@@ -1011,8 +1006,6 @@ abstract class Module
$smarty->assign('module_template_dir', ($overloaded ? _THEME_DIR_ : __PS_BASE_URI__).'modules/'.basename($file, '.php').'/');
$result = $smarty->fetch(($overloaded ? _PS_THEME_DIR_.'modules/'.basename($file, '.php') : _PS_MODULE_DIR_.basename($file, '.php')).'/'.$template, $cacheId, $compileId);
}
if (Configuration::get('PS_FORCE_SMARTY_2')) /* Keep a backward compatibility for Smarty v2 */
$smarty->currentTemplate = $previousTemplate;
return $result;
}
@@ -1025,24 +1018,14 @@ abstract class Module
{
global $smarty;
/* Use Smarty 3 API calls */
if (!Configuration::get('PS_FORCE_SMARTY_2')) /* PHP version > 5.1.2 */
return $smarty->isCached($this->_getApplicableTemplateDir($template).$template, $cacheId, $compileId);
/* or keep a backward compatibility if PHP version < 5.1.2 */
else
return $smarty->is_cached($this->_getApplicableTemplateDir($template).$template, $cacheId, $compileId);
return $smarty->isCached($this->_getApplicableTemplateDir($template).$template, $cacheId, $compileId);
}
protected function _clearCache($template, $cacheId = NULL, $compileId = NULL)
{
global $smarty;
/* Use Smarty 3 API calls */
if (!Configuration::get('PS_FORCE_SMARTY_2')) /* PHP version > 5.1.2 */
return $smarty->clearCache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId);
/* or keep a backward compatibility if PHP version < 5.1.2 */
else
return $smarty->clear_cache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId);
return $smarty->clearCache($template ? $this->_getApplicableTemplateDir($template).$template : NULL, $cacheId, $compileId);
}
protected function _generateConfigXml()
-4
View File
@@ -448,8 +448,6 @@ if ($lm->getIncludeTradFilename())
<li class="required first">/config</li>
<li class="required">/tools/smarty/compile</li>
<li class="required">/tools/smarty/cache</li>
<li class="required">/tools/smarty_v2/compile</li>
<li class="required">/tools/smarty_v2/cache</li>
<li class="required">/sitemap.xml</li>
<li class="required">/log</li>
<li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li>
@@ -1249,8 +1247,6 @@ if ($lm->getIncludeTradFilename())
<li class="required first">/config</li>
<li class="required">/tools/smarty/compile</li>
<li class="required">/tools/smarty/cache</li>
<li class="required">/tools/smarty_v2/compile</li>
<li class="required">/tools/smarty_v2/cache</li>
<li class="required">/sitemap.xml</li>
<li class="required">/log</li>
<li class="title"><?php echo lang('Write permissions on folders (and subfolders):')?></li>
-1
View File
@@ -180,7 +180,6 @@ INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_a
(100, 'PS_ATTACHMENT_MAXIMUM_SIZE', '2', NOW(), NOW()),
(101, 'PS_SMARTY_CACHE', '1', NOW(), NOW()),
(102, 'PS_DIMENSION_UNIT', 'cm', NOW(), NOW()),
(103, 'PS_FORCE_SMARTY_2', '0', NOW(), NOW()),
(104, 'PS_GUEST_CHECKOUT_ENABLED', '0', NOW(), NOW()),
(105, 'PS_DISPLAY_SUPPLIERS', '1', NOW(), NOW()),
(106, 'PS_CATALOG_MODE', '0', NOW(), NOW()),
+2
View File
@@ -79,6 +79,8 @@ ALTER TABLE `PREFIX_product_attribute` ADD `available_date` DATETIME NOT NULL;
/* Index was only used by deprecated function Image::positionImage() */
ALTER TABLE `PREFIX_image` DROP INDEX `product_position`;
DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_FORCE_SMARTY_2';
CREATE TABLE IF NOT EXISTS `PREFIX_order_detail_tax` (
`id_order_detail` INT NOT NULL ,
`id_tax` INT NOT NULL
-2
View File
@@ -41,8 +41,6 @@ $tests = array(
'config_dir' => INSTALL_PATH.'/../config/',
'tools_dir' => INSTALL_PATH.'/../tools/smarty/compile/',
'cache_dir' => INSTALL_PATH.'/../tools/smarty/cache/',
'tools_v2_dir' => INSTALL_PATH.'/../tools/smarty_v2/compile/',
'cache_v2_dir' => INSTALL_PATH.'/../tools/smarty_v2/cache/',
'sitemap' => INSTALL_PATH.'/../sitemap.xml',
'log_dir' => INSTALL_PATH.'/../log/',
'img_dir' => INSTALL_PATH.'/../img/',
-3
View File
@@ -274,9 +274,6 @@ if (isFormValid())
if(!$dbInstance->Execute($query))
$error['infosInsertSQL'] = '11';
unset($dbInstance);
//select the version of Smarty for the version of php
Tools::selectionVersionSmarty();
}
//////////////////////////