// Fix PSCFV-3933

This commit is contained in:
rGaillard
2012-09-06 15:43:45 +00:00
parent ce61ea1efc
commit b3243a3815
14 changed files with 40 additions and 41 deletions
@@ -6,7 +6,7 @@
<div class="translatable"> <div class="translatable">
{foreach from=$languages item=language} {foreach from=$languages item=language}
<div class="lang_{$language.id_lang|intval}" style="display:{if $language.id_lang == $id_lang_default}block{else}none{/if};float:left"> <div class="lang_{$language.id_lang|intval}" style="display:{if $language.id_lang == $id_lang_default}block{else}none{/if};float:left">
<input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)}" style="width:400px" /> <input type="text" id="name_{$language.id_lang|intval}" name="name_{$language.id_lang|intval}" value="{$currentTab->getFieldValue($currentObject, 'name', $language.id_lang|intval)|escape:html:'UTF-8'}" style="width:400px" />
<sup>*</sup> <sup>*</sup>
</div> </div>
{/foreach} {/foreach}
@@ -237,7 +237,7 @@
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;"> <form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
<input type="hidden" name="id_product" value="{$id_product}" /> <input type="hidden" name="id_product" value="{$id_product}" />
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual}" /> <input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual|escape:html:'UTF-8'}" />
<div class="tab-pane" id="tabPane1"> <div class="tab-pane" id="tabPane1">
{if !$product->active && $product->isAssociatedToShop()} {if !$product->active && $product->isAssociatedToShop()}
<div class="warn draft" > <div class="warn draft" >
@@ -136,7 +136,7 @@
<tr> <tr>
<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td> <td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
<td style="padding-bottom:5px;"> <td style="padding-bottom:5px;">
<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span> <input size="55" maxlength="12" type="text" name="upc" value="{$product->upc|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
</td> </td>
</tr> </tr>
</table> </table>
+5 -5
View File
@@ -42,7 +42,7 @@
<br/> <br/>
<ol> <ol>
{foreach $errors as $error} {foreach $errors as $error}
<li>{$error}</li> <li>{$error|escape:html:'UTF-8'}</li>
{/foreach} {/foreach}
</ol> </ol>
{/if} {/if}
@@ -52,7 +52,7 @@
{if isset($informations) && count($informations) && $informations} {if isset($informations) && count($informations) && $informations}
<div class="hint clear" style="display:block;"> <div class="hint clear" style="display:block;">
{foreach $informations as $info} {foreach $informations as $info}
{$info}<br /> {$info|escape:html:'UTF-8'}<br />
{/foreach} {/foreach}
</div><br /> </div><br />
{/if} {/if}
@@ -60,7 +60,7 @@
{if isset($confirmations) && count($confirmations) && $confirmations} {if isset($confirmations) && count($confirmations) && $confirmations}
<div class="conf" style="display:block;"> <div class="conf" style="display:block;">
{foreach $confirmations as $conf} {foreach $confirmations as $conf}
{$conf}<br /> {$conf|escape:html:'UTF-8'}<br />
{/foreach} {/foreach}
</div><br /> </div><br />
{/if} {/if}
@@ -78,13 +78,13 @@
</span> </span>
<ul {if count($warnings) > 1}style="display:none;"{/if} id="seeMore"> <ul {if count($warnings) > 1}style="display:none;"{/if} id="seeMore">
{foreach $warnings as $warning} {foreach $warnings as $warning}
<li>{$warning}</li> <li>{$warning|escape:html:'UTF-8'}</li>
{/foreach} {/foreach}
</ul> </ul>
{else} {else}
<ul style="margin-top: 3px"> <ul style="margin-top: 3px">
{foreach $warnings as $warning} {foreach $warnings as $warning}
<li>{$warning}</li> <li>{$warning|escape:html:'UTF-8'}</li>
{/foreach} {/foreach}
</ul> </ul>
{/if} {/if}
+2 -2
View File
@@ -103,7 +103,7 @@ class BlockCategories extends Module
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<label>'.$this->l('Maximum depth').'</label> <label>'.$this->l('Maximum depth').'</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="maxDepth" value="'.Configuration::get('BLOCK_CATEG_MAX_DEPTH').'" /> <input type="text" name="maxDepth" value="'.(int)Configuration::get('BLOCK_CATEG_MAX_DEPTH').'" />
<p class="clear">'.$this->l('Set the maximum depth of sublevels displayed in this block (0 = infinite)').'</p> <p class="clear">'.$this->l('Set the maximum depth of sublevels displayed in this block (0 = infinite)').'</p>
</div> </div>
<label>'.$this->l('Dynamic').'</label> <label>'.$this->l('Dynamic').'</label>
@@ -129,7 +129,7 @@ class BlockCategories extends Module
</div> </div>
<label>'.$this->l('Footer columns number').'</label> <label>'.$this->l('Footer columns number').'</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="nbrColumns" value="'.Configuration::get('BLOCK_CATEG_NBR_COLUMN_FOOTER').'" /> <input type="text" name="nbrColumns" value="'.(int)Configuration::get('BLOCK_CATEG_NBR_COLUMN_FOOTER').'" />
<p class="clear">'.$this->l('Set the number of footer columns').'</p> <p class="clear">'.$this->l('Set the number of footer columns').'</p>
</div> </div>
<center><input type="submit" name="submitBlockCategories" value="'.$this->l('Save').'" class="button" /></center> <center><input type="submit" name="submitBlockCategories" value="'.$this->l('Save').'" class="button" /></center>
+2 -2
View File
@@ -28,7 +28,7 @@
<h4>{l s='Contact us' mod='blockcontact'}</h4> <h4>{l s='Contact us' mod='blockcontact'}</h4>
<div class="block_content clearfix"> <div class="block_content clearfix">
<p>{l s='Our hotline is available 24/7' mod='blockcontact'}</p> <p>{l s='Our hotline is available 24/7' mod='blockcontact'}</p>
{if $telnumber != ''}<p class="tel"><span class="label">{l s='Phone:' mod='blockcontact'}</span>{$telnumber}</p>{/if} {if $telnumber != ''}<p class="tel"><span class="label">{l s='Phone:' mod='blockcontact'}</span>{$telnumber|escape:'htmlall':'UTF-8'}</p>{/if}
{if $email != ''}<a href="mailto:{$email}">{l s='Contact our hotline' mod='blockcontact'}</a>{/if} {if $email != ''}<a href="mailto:{$email|escape:'htmlall':'UTF-8'}">{l s='Contact our hotline' mod='blockcontact'}</a>{/if}
</div> </div>
</div> </div>
@@ -81,13 +81,13 @@ class Blockcontactinfos extends Module
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post"> <form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset> <fieldset>
<p><label for="company">'.$this->l('Company name').' :</label> <p><label for="company">'.$this->l('Company name').' :</label>
<input type="text" id="company" name="company" value="'.Configuration::get('blockcontactinfos_company').'" /></p> <input type="text" id="company" name="company" value="'.Tools::safeOutput(Configuration::get('blockcontactinfos_company')).'" /></p>
<p><label for="address">'.$this->l('Address').' :</label> <p><label for="address">'.$this->l('Address').' :</label>
<textarea id="address" name="address" cols="60" rows="4">'.Configuration::get('blockcontactinfos_address').'</textarea></p> <textarea id="address" name="address" cols="60" rows="4">'.Tools::safeOutput(Configuration::get('blockcontactinfos_address')).'</textarea></p>
<p><label for="phone">'.$this->l('Phone number').' :</label> <p><label for="phone">'.$this->l('Phone number').' :</label>
<input type="text" id="phone" name="phone" value="'.Configuration::get('blockcontactinfos_phone').'" /></p> <input type="text" id="phone" name="phone" value="'.Tools::safeOutput(Configuration::get('blockcontactinfos_phone')).'" /></p>
<p><label for="email">'.$this->l('Email').' :</label> <p><label for="email">'.$this->l('Email').' :</label>
<input type="text" id="email" name="email" value="'.Configuration::get('blockcontactinfos_email').'" /> </p> <input type="text" id="email" name="email" value="'.Tools::safeOutput(Configuration::get('blockcontactinfos_email')).'" /> </p>
<div class="margin-form"> <div class="margin-form">
<input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center> <input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</div> </div>
@@ -28,10 +28,10 @@
<div id="block_contact_infos"> <div id="block_contact_infos">
<h4>{l s='Contact us' mod='blockcontactinfos'}</h4> <h4>{l s='Contact us' mod='blockcontactinfos'}</h4>
<ul> <ul>
{if $blockcontactinfos_company != ''}<li><strong>{$blockcontactinfos_company}</strong></li>{/if} {if $blockcontactinfos_company != ''}<li><strong>{$blockcontactinfos_company|escape:'htmlall':'UTF-8'}</strong></li>{/if}
{if $blockcontactinfos_address != ''}<li><pre>{$blockcontactinfos_address}</pre></li>{/if} {if $blockcontactinfos_address != ''}<li><pre>{$blockcontactinfos_address|escape:'htmlall':'UTF-8'}</pre></li>{/if}
{if $blockcontactinfos_phone != ''}<li>{l s='Tel:'} {$blockcontactinfos_phone}</li>{/if} {if $blockcontactinfos_phone != ''}<li>{l s='Tel:'} {$blockcontactinfos_phone|escape:'htmlall':'UTF-8'}</li>{/if}
{if $blockcontactinfos_email != ''}<li>{l s='Email:'} {mailto address=$blockcontactinfos_email encode="hex"}</li>{/if} {if $blockcontactinfos_email != ''}<li>{l s='Email:'} {mailto address=$blockcontactinfos_email|escape:'htmlall':'UTF-8' encode="hex"}</li>{/if}
</ul> </ul>
</div> </div>
<!-- /MODULE Block contact infos --> <!-- /MODULE Block contact infos -->
+7 -8
View File
@@ -201,12 +201,11 @@ class BlockLink extends Module
$assos_shop = Tools::getValue('checkBoxShopAsso_blocklink'); $assos_shop = Tools::getValue('checkBoxShopAsso_blocklink');
if (empty($assos_shop)) if (empty($assos_shop))
return false; return false;
foreach ($assos_shop as $asso) foreach ($assos_shop as $id_shop => $row)
foreach ($asso as $id_shop => $row) Db::getInstance()->insert('blocklink_shop', array(
Db::getInstance()->insert('blocklink_shop', array( 'id_blocklink' => (int)$id_link,
'id_blocklink' => (int)$id_link, 'id_shop' => (int)$id_shop,
'id_shop' => (int)$id_shop, ));
));
} }
return true; return true;
} }
@@ -314,12 +313,12 @@ class BlockLink extends Module
} }
$this->_html .= ' $this->_html .= '
<script type="text/javascript"> <script type="text/javascript">
id_language = Number('.$id_lang_default.'); id_language = Number('.(int)$id_lang_default.');
</script> </script>
<fieldset> <fieldset>
<legend><img src="'.$this->_path.'add.png" alt="" title="" /> '.$this->l('Add a new link').'</legend> <legend><img src="'.$this->_path.'add.png" alt="" title="" /> '.$this->l('Add a new link').'</legend>
<form method="post" action="index.php?controller=adminmodules&configure='.Tools::safeOutput(Tools::getValue('configure')).'&token='.Tools::safeOutput(Tools::getValue('token')).'&tab_module='.Tools::safeOutput(Tools::getValue('tab_module')).'&module_name='.Tools::safeOutput(Tools::getValue('module_name')).'"> <form method="post" action="index.php?controller=adminmodules&configure='.Tools::safeOutput(Tools::getValue('configure')).'&token='.Tools::safeOutput(Tools::getValue('token')).'&tab_module='.Tools::safeOutput(Tools::getValue('tab_module')).'&module_name='.Tools::safeOutput(Tools::getValue('module_name')).'">
<input type="hidden" name="id_link" value="'.Tools::getValue('id_link').'" /> <input type="hidden" name="id_link" value="'.(int)Tools::getValue('id_link').'" />
<label>'.$this->l('Text:').'</label> <label>'.$this->l('Text:').'</label>
<div class="margin-form">'; <div class="margin-form">';
foreach ($languages as $language) foreach ($languages as $language)
+3 -3
View File
@@ -71,13 +71,13 @@ class blocksocial extends Module
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post"> <form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset class="width2"> <fieldset class="width2">
<label for="facebook_url">'.$this->l('Facebook URL: ').'</label> <label for="facebook_url">'.$this->l('Facebook URL: ').'</label>
<input type="text" id="facebook_url" name="facebook_url" value="'.((Configuration::get('blocksocial_facebook') != "") ? Configuration::get('blocksocial_facebook') : "").'" /> <input type="text" id="facebook_url" name="facebook_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_facebook') != "") ? Configuration::get('blocksocial_facebook') : "").'" />
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<label for="twitter_url">'.$this->l('Twitter URL: ').'</label> <label for="twitter_url">'.$this->l('Twitter URL: ').'</label>
<input type="text" id="twitter_url" name="twitter_url" value="'.((Configuration::get('blocksocial_twitter') != "") ? Configuration::get('blocksocial_twitter') : "").'" /> <input type="text" id="twitter_url" name="twitter_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_twitter') != "") ? Configuration::get('blocksocial_twitter') : "").'" />
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<label for="rss_url">'.$this->l('RSS URL: ').'</label> <label for="rss_url">'.$this->l('RSS URL: ').'</label>
<input type="text" id="rss_url" name="rss_url" value="'.((Configuration::get('blocksocial_rss') != "") ? Configuration::get('blocksocial_rss') : "").'" /> <input type="text" id="rss_url" name="rss_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_rss') != "") ? Configuration::get('blocksocial_rss') : "").'" />
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center> <br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset> </fieldset>
+4 -4
View File
@@ -27,8 +27,8 @@
<div id="social_block"> <div id="social_block">
<h4>{l s='Follow us' mod='blocksocial'}</h4> <h4>{l s='Follow us' mod='blocksocial'}</h4>
<ul> <ul>
{if $facebook_url != ''}<li class="facebook"><a href="{$facebook_url}">{l s='Facebook' mod='blocksocial'}</a></li>{/if} {if $facebook_url != ''}<li class="facebook"><a href="{$facebook_url|escape:html:'UTF-8'}">{l s='Facebook' mod='blocksocial'}</a></li>{/if}
{if $twitter_url != ''}<li class="twitter"><a href="{$twitter_url}">{l s='Twitter' mod='blocksocial'}</a></li>{/if} {if $twitter_url != ''}<li class="twitter"><a href="{$twitter_url|escape:html:'UTF-8'}">{l s='Twitter' mod='blocksocial'}</a></li>{/if}
{if $rss_url != ''}<li class="rss"><a href="{$rss_url}">{l s='RSS' mod='blocksocial'}</a></li>{/if} {if $rss_url != ''}<li class="rss"><a href="{$rss_url|escape:html:'UTF-8'}">{l s='RSS' mod='blocksocial'}</a></li>{/if}
</ul> </ul>
</div> </div>
+1 -1
View File
@@ -201,7 +201,7 @@ class Blocktopmenu extends Module
<div style="display: none"> <div style="display: none">
<label>'.$this->l('Items').'</label> <label>'.$this->l('Items').'</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="items" id="itemsInput" value="'.Configuration::get('MOD_BLOCKTOPMENU_ITEMS').'" size="70" /> <input type="text" name="items" id="itemsInput" value="'.Tools::safeOutput(Configuration::get('MOD_BLOCKTOPMENU_ITEMS')).'" size="70" />
</div> </div>
</div> </div>
+4 -4
View File
@@ -159,7 +159,7 @@ class MailAlerts extends Module
$email = trim($email); $email = trim($email);
if (!empty($email) && !Validate::isEmail($email)) if (!empty($email) && !Validate::isEmail($email))
{ {
$errors[] = $this->l('Invalid e-mail:').' '.$email; $errors[] = $this->l('Invalid e-mail:').' '.Tools::safeOutput($email);
break; break;
} }
else if (!empty($email) && count($email) > 0) else if (!empty($email) && count($email) > 0)
@@ -224,7 +224,7 @@ class MailAlerts extends Module
</div> </div>
<label>'.$this->l('Threshold:').'</label> <label>'.$this->l('Threshold:').'</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="MA_LAST_QTIES" value="'.(Tools::getValue('MA_LAST_QTIES') != null ? (int)Tools::getValue('MA_LAST_QTIES') : Configuration::get('MA_LAST_QTIES')).'" size="3" /> <input type="text" name="MA_LAST_QTIES" value="'.(Tools::getValue('MA_LAST_QTIES') != null ? (int)Tools::getValue('MA_LAST_QTIES') : (int)Configuration::get('MA_LAST_QTIES')).'" size="3" />
<p>'.$this->l('Quantity for which a product is considered out of stock').'</p> <p>'.$this->l('Quantity for which a product is considered out of stock').'</p>
</div> </div>
<div style="clear:both;">&nbsp;</div> <div style="clear:both;">&nbsp;</div>
@@ -235,7 +235,7 @@ class MailAlerts extends Module
</div> </div>
<label>'.$this->l('Coverage:').'</label> <label>'.$this->l('Coverage:').'</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="MA_PRODUCT_COVERAGE" value="'.(Tools::getValue('MA_PRODUCT_COVERAGE') != null ? (int)Tools::getValue('MA_PRODUCT_COVERAGE') : Configuration::getGlobalValue('MA_PRODUCT_COVERAGE')).'" size="3" /> <input type="text" name="MA_PRODUCT_COVERAGE" value="'.(Tools::getValue('MA_PRODUCT_COVERAGE') != null ? (int)Tools::getValue('MA_PRODUCT_COVERAGE') : (int)Configuration::getGlobalValue('MA_PRODUCT_COVERAGE')).'" size="3" />
<p>'.$this->l('Stock coverage, in days. Also, the stock coverage of a given product will be calculated based on this number').'</p> <p>'.$this->l('Stock coverage, in days. Also, the stock coverage of a given product will be calculated based on this number').'</p>
</div> </div>
<div style="clear:both;">&nbsp;</div> <div style="clear:both;">&nbsp;</div>
@@ -243,7 +243,7 @@ class MailAlerts extends Module
<label>'.$this->l('E-mail addresses:').' </label> <label>'.$this->l('E-mail addresses:').' </label>
<div class="margin-form"> <div class="margin-form">
<div style="float:left; margin-right:10px;"> <div style="float:left; margin-right:10px;">
<textarea name="ma_merchant_mails" rows="10" cols="40">'.Tools::getValue('ma_merchant_mails', str_replace(self::__MA_MAIL_DELIMITOR__, "\n", $this->_merchant_mails)).'</textarea> <textarea name="ma_merchant_mails" rows="10" cols="40">'.Tools::safeOutput(Tools::getValue('ma_merchant_mails', str_replace(self::__MA_MAIL_DELIMITOR__, "\n", $this->_merchant_mails))).'</textarea>
</div> </div>
<div style="float:left;"> <div style="float:left;">
'.$this->l('One e-mail address per line (e.g. bob@example.com)').' '.$this->l('One e-mail address per line (e.g. bob@example.com)').'
+1 -1
View File
@@ -174,7 +174,7 @@ class Watermark extends Module
</tr> </tr>
<tr> <tr>
<td width="270" style="height: 35px;">'.$this->l('Watermark transparency (0-100)').'</td> <td width="270" style="height: 35px;">'.$this->l('Watermark transparency (0-100)').'</td>
<td><input type="text" name="transparency" value="'.Tools::getValue('transparency', Configuration::get('WATERMARK_TRANSPARENCY')).'" style="width: 30px;" /></td> <td><input type="text" name="transparency" value="'.(float)Tools::getValue('transparency', Configuration::get('WATERMARK_TRANSPARENCY')).'" style="width: 30px;" /></td>
</tr> </tr>
<tr><td width="270" style="height: 35px;">'.$this->l('Watermark X align').'</td> <tr><td width="270" style="height: 35px;">'.$this->l('Watermark X align').'</td>
<td> <td>