[*] MO: Add smarty cache on blocksocial
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
* needs please refer to http://www.prestashop.com for more information.
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
*
|
*
|
||||||
* @author PrestaShop SA <contact@prestashop.com>
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
* @copyright 2007-2013 PrestaShop SA␍
|
* @copyright 2007-2013 PrestaShop SA
|
||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
@@ -61,6 +61,7 @@ class blocksocial extends Module
|
|||||||
Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: ''));
|
Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: ''));
|
||||||
Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: ''));
|
Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: ''));
|
||||||
Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: ''));
|
Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: ''));
|
||||||
|
$this->_clearCache('blocksocial.tpl');
|
||||||
$output = '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
|
$output = '<div class="conf confirm">'.$this->l('Configuration updated').'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,14 +91,14 @@ class blocksocial extends Module
|
|||||||
|
|
||||||
public function hookDisplayFooter()
|
public function hookDisplayFooter()
|
||||||
{
|
{
|
||||||
global $smarty;
|
if (!$this->isCached('blocksocial.tpl', $this->getCacheId()))
|
||||||
|
$this->smarty->assign(array(
|
||||||
|
'facebook_url' => Configuration::get('blocksocial_facebook'),
|
||||||
|
'twitter_url' => Configuration::get('blocksocial_twitter'),
|
||||||
|
'rss_url' => Configuration::get('blocksocial_rss')
|
||||||
|
));
|
||||||
|
|
||||||
$smarty->assign(array(
|
return $this->display(__FILE__, 'blocksocial.tpl', $this->getCacheId());
|
||||||
'facebook_url' => Configuration::get('blocksocial_facebook'),
|
|
||||||
'twitter_url' => Configuration::get('blocksocial_twitter'),
|
|
||||||
'rss_url' => Configuration::get('blocksocial_rss')
|
|
||||||
));
|
|
||||||
return $this->display(__FILE__, 'blocksocial.tpl');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user