// merge 1.4 (5397)

This commit is contained in:
fBrignoli
2011-04-22 16:00:58 +00:00
parent 0cd5856fe5
commit ff49083fb6
126 changed files with 3390 additions and 1430 deletions
+10 -8
View File
@@ -185,14 +185,15 @@ abstract class AdminTabCore
if ($className == 'AdminCategories' OR $className == 'AdminProducts')
$className = 'AdminCatalog';
$this->token = Tools::getAdminToken($className.(int)($this->id).(int)($cookie->id_employee));
}
/**
* use translations files to replace english expression.
*
*
* @param mixed $string term or expression in english
* @param string $class
* @param string $class
* @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes().
* @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8')
* @return string the translation if available, or the english default text.
@@ -297,6 +298,7 @@ abstract class AdminTabCore
foreach ($res AS $row)
$required_fields[(int)$row['id_required_field']] = $row['field_name'];
$table_fields = Db::getInstance()->ExecuteS('SHOW COLUMNS FROM '.pSQL(_DB_PREFIX_.$this->table));
$irow = 0;
foreach ($table_fields AS $field)
@@ -1094,7 +1096,7 @@ abstract class AdminTabCore
LIMIT '.(int)($start).','.(int)($limit);
$this->_list = Db::getInstance()->ExecuteS($sql);
$this->_listTotal = count(Db::getInstance()->ExecuteS('SELECT
$this->_listTotal = count(Db::getInstance()->ExecuteS('SELECT
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').'
'.($this->lang ? 'b.*, ' : '').'a.*'.(isset($this->_select) ? ', '.$this->_select.' ' : '').'
FROM `'._DB_PREFIX_.$sqlTable.'` a
@@ -1105,8 +1107,8 @@ abstract class AdminTabCore
'.((isset($this->_filterHaving) || isset($this->_having)) ? 'HAVING ' : '').(isset($this->_filterHaving) ? ltrim($this->_filterHaving, ' AND ') : '').(isset($this->_having) ? $this->_having.' ' : '').'
ORDER BY '.(($orderBy == $this->identifier) ? 'a.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).
($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '')));
}
/**
@@ -1145,9 +1147,9 @@ abstract class AdminTabCore
global $currentIndex, $cookie;
$isCms = false;
if (preg_match('/cms/Ui', $this->identifier))
$isCms = true;
$isCms = true;
$id_cat = Tools::getValue('id_'.($isCms ? 'cms_' : '').'category');
if (!isset($token) OR empty($token))
$token = $this->token;
@@ -1469,7 +1471,7 @@ abstract class AdminTabCore
{
global $currentIndex;
echo '<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&'.$active.
echo '<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&'.$active.$this->table.
((int)$id_category AND (int)$id_product ? '&id_category='.$id_category : '').'&token='.($token!=NULL ? $token : $this->token).'">
<img src="../img/admin/'.($value ? 'enabled.gif' : 'disabled.gif').'"
alt="'.($value ? $this->l('Enabled') : $this->l('Disabled')).'" title="'.($value ? $this->l('Enabled') : $this->l('Disabled')).'" /></a>';