// Merge -> revision 8552

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8554 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-14 08:29:10 +00:00
parent aa05a52c9b
commit 87df41c9d6
20 changed files with 541 additions and 2318 deletions
+4 -5
View File
@@ -307,15 +307,14 @@ class AdminGroups extends AdminTab
if (!($obj = $this->loadObject()))
return;
$groupReduction = new GroupReduction();
if (!$id_category = Tools::getValue('id_category') OR !Validate::isUnsignedId($id_category))
if (!$id_category = Tools::getValue('id_category') || !Validate::isUnsignedId($id_category))
$this->_errors[] = Tools::displayError('Wrong category ID');
elseif (!$reduction = Tools::getValue('reductionByCategory') OR !Validate::isPrice($reduction))
else if (!$reduction = Tools::getValue('reductionByCategory') || !Validate::isPrice($reduction))
$this->_errors[] = Tools::displayError('Invalid reduction (must be a percentage)');
elseif (Tools::getValue('reductionByCategory') > 100 OR Tools::getValue('reductionByCategory') < 0)
else if (Tools::getValue('reductionByCategory') > 100 || Tools::getValue('reductionByCategory') < 0)
$this->_errors[] = Tools::displayError('Reduction value is incorrect');
elseif (GroupReduction::doesExist((int)($obj->id), $id_category)){
else if (GroupReduction::doesExist((int)$obj->id, $id_category))
$this->_errors[] = Tools::displayError('A reduction already exists for this category.');
}
else
{
$category = new Category((int)$id_category);
+11 -9
View File
@@ -350,16 +350,18 @@ class AdminModules extends AdminTab
unset(Context::getContext()->tmpOldShop);
}
}
if ($key != 'configure' AND isset($_GET['bpay']))
if ($key != 'configure' && isset($_GET['bpay']))
Tools::redirectAdmin('index.php?tab=AdminPayment&token='.Tools::getAdminToken('AdminPayment'.(int)(Tab::getIdFromClassName('AdminPayment')).(int)$this->context->employee->id));
}
if (sizeof($module_errors))
if (count($module_errors))
{
$htmlError = '<ul>';
foreach ($module_errors AS $module_error)
$htmlError .= '<li>'.$module_error.'</li>';
$htmlError .= '</ul>';
$this->_errors[] = Tools::displayError('The following module(s) were not installed successfully:').$htmlError;
// If error during module installation, no redirection
$html_error = '<ul>';
foreach ($module_errors as $module_error)
$html_error .= '<li>'.$module_error.'</li>';
$html_error .= '</ul>';
$this->_errors[] = sprintf(Tools::displayError('The following module(s) were not installed successfully: %s'), $html_error);
}
}
if ($return)
@@ -367,7 +369,7 @@ class AdminModules extends AdminTab
}
}
function extractArchive($file)
public function extractArchive($file)
{
$success = false;
if (substr($file, -4) == '.zip')
@@ -391,7 +393,7 @@ class AdminModules extends AdminTab
public function display()
{
if (!isset($_GET['configure']) AND !isset($_GET['delete']) OR sizeof($this->_errors) )
if (!isset($_GET['configure']) && !isset($_GET['delete']) || count($this->_errors))
$this->displayList();
}
File diff suppressed because it is too large Load Diff