// Merge -> revision 8014
This commit is contained in:
@@ -179,7 +179,7 @@ class AdminGenerator extends AdminTab
|
||||
$tab = array();
|
||||
|
||||
// Directories
|
||||
$tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/', 'lang-'.Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')).'/');
|
||||
$tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/', Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')).'/');
|
||||
|
||||
// Files
|
||||
$tab['Files'] = array('addresses.php', 'address.php', 'authentication.php', 'cart.php', 'discount.php', 'footer.php',
|
||||
|
||||
@@ -147,6 +147,7 @@ class AdminGroups extends AdminTab
|
||||
foreach ($categories AS $category)
|
||||
echo ' <option value="'.(int)($category['id_category']).'">'.Tools::htmlentitiesUTF8($category['name']).'</option>';
|
||||
echo ' </select><sup>*</sup>
|
||||
<p>'.$this->l('Only products that have this category as default category will be affected').'.</p>
|
||||
</div>
|
||||
<label>'.$this->l('Discount (in %):').' </label>
|
||||
<div class="margin-form">
|
||||
@@ -334,6 +335,7 @@ class AdminGroups extends AdminTab
|
||||
$id_group_reductions = Tools::getValue('gr_id_group_reduction');
|
||||
$reductions = Tools::getValue('gr_reduction');
|
||||
if ($id_group_reductions)
|
||||
{
|
||||
foreach ($id_group_reductions AS $key => $id_group_reduction)
|
||||
if (!Validate::isUnsignedId($id_group_reductions[$key]) OR !Validate::isPrice($reductions[$key]))
|
||||
$this->_errors[] = Tools::displayError();
|
||||
@@ -344,6 +346,7 @@ class AdminGroups extends AdminTab
|
||||
if (!$groupReduction->update())
|
||||
$this->_errors[] = Tools::displayError('Cannot update group reductions');
|
||||
}
|
||||
}
|
||||
if (!sizeof($this->_errors))
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ class AdminLanguages extends AdminTab
|
||||
}
|
||||
unlink($tmpName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,6 +121,13 @@ class AdminLanguages extends AdminTab
|
||||
return !sizeof($this->_errors) ? true : false;
|
||||
}
|
||||
|
||||
protected function copyFromPost(&$object, $table)
|
||||
{
|
||||
if($object->id AND ($object->iso_code != $_POST['iso_code']))
|
||||
if(Validate::isLanguageIsoCode($_POST['iso_code']))
|
||||
$object->moveToIso($_POST['iso_code']);
|
||||
parent::copyFromPost($object, $table);
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user