// Normalize adminRequestController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9006 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -186,7 +186,8 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedSelect':
|
case 'checkedSelect':
|
||||||
if (isset($e[$key]['table']))
|
if (isset($e[$key]['table']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The Table ').' "'.$e[$key]['table'].'" '.$this->l(' doesn\'t exist.'));
|
$this->_errors[] = Tools::DisplayError($this->l('The Table ').' "'.$e[$key]['table'].'" '.$this->l(' doesn\'t exist.'));
|
||||||
@@ -197,7 +198,8 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
$this->_errors[] = Tools::DisplayError($this->l('The operand "*" can be used in a nested query.'));
|
$this->_errors[] = Tools::DisplayError($this->l('The operand "*" can be used in a nested query.'));
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedWhere':
|
case 'checkedWhere':
|
||||||
if (isset($e[$key]['operator']))
|
if (isset($e[$key]['operator']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The operator ').' "'.$e[$key]['operator'].'" '.$this->l(' used is incorrect.'));
|
$this->_errors[] = Tools::DisplayError($this->l('The operator ').' "'.$e[$key]['operator'].'" '.$this->l(' used is incorrect.'));
|
||||||
@@ -206,7 +208,8 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedHaving':
|
case 'checkedHaving':
|
||||||
if (isset($e[$key]['operator']))
|
if (isset($e[$key]['operator']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The operator ').' "'.$e[$key]['operator'].'" '.$this->l(' used is incorrect.'));
|
$this->_errors[] = Tools::DisplayError($this->l('The operator ').' "'.$e[$key]['operator'].'" '.$this->l(' used is incorrect.'));
|
||||||
@@ -215,40 +218,43 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedOrder':
|
case 'checkedOrder':
|
||||||
if (isset($e[$key]['attribut']))
|
if (isset($e[$key]['attribut']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The attribute ').' "'.
|
$this->_errors[] = Tools::DisplayError($this->l('The attribute ').' "'.
|
||||||
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedGroupBy':
|
case 'checkedGroupBy':
|
||||||
if (isset($e[$key]['attribut']))
|
if (isset($e[$key]['attribut']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The attribute ').' "'.
|
$this->_errors[] = Tools::DisplayError($this->l('The attribute ').' "'.
|
||||||
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
$e[$key]['attribut'][0].'" '.$this->l(' does not exist in the table: ').$e[$key]['attribut'][1].'.');
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
$this->_errors[] = Tools::DisplayError($this->l('Error'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'checkedLimit':
|
case 'checkedLimit':
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The LIMIT clause must contain numeric arguments.'));
|
$this->_errors[] = Tools::DisplayError($this->l('The LIMIT clause must contain numeric arguments.'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'returnNameTable':
|
case 'returnNameTable':
|
||||||
if (isset($e[$key]['reference']))
|
if (isset($e[$key]['reference']))
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('The reference ').'"'.
|
$this->_errors[] = Tools::DisplayError($this->l('The reference ').'"'.
|
||||||
$e[$key]['reference'][0].'"'.$this->l(' doesn\'t exist in : ').$e[$key]['reference'][1]);
|
$e[$key]['reference'][0].'"'.$this->l(' doesn\'t exist in : ').$e[$key]['reference'][1]);
|
||||||
else
|
else
|
||||||
$this->_errors[] = Tools::DisplayError($this->l('When multiple tables are used, each attribute must be referenced to a table.'));
|
$this->_errors[] = Tools::DisplayError($this->l('When multiple tables are used, each attribute must be referenced to a table.'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'testedRequired':
|
case 'testedRequired':
|
||||||
$this->_errors[] = Tools::DisplayError($e[$key].' '.$this->l(' doesn\'t exist.'));
|
$this->_errors[] = Tools::DisplayError($e[$key].' '.$this->l(' doesn\'t exist.'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'testedUnauthorized':
|
case 'testedUnauthorized':
|
||||||
$this->_errors[] = Tools::DisplayError($e[$key].' '.$this->l(' is a unauthorized keyword.'));
|
$this->_errors[] = Tools::DisplayError($e[$key].' '.$this->l(' is a unauthorized keyword.'));
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,11 +267,13 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
$smarty = $this->context->smarty;
|
$smarty = $this->context->smarty;
|
||||||
$smarty->assign('tab_form', array('current' => self::$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token,
|
$smarty->assign('tab_form', array(
|
||||||
'id' => $obj->id,
|
'current' => self::$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token,
|
||||||
'table' => $this->table,
|
'id' => $obj->id,
|
||||||
'name' => $this->getFieldValue($obj, 'name'),
|
'table' => $this->table,
|
||||||
'sql' => $this->getFieldValue($obj, 'sql')));
|
'name' => $this->getFieldValue($obj, 'name'),
|
||||||
|
'sql' => $this->getFieldValue($obj, 'sql')
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
@@ -298,8 +306,10 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$smarty->assign('info', $this->info);
|
$smarty->assign(array(
|
||||||
$smarty->assign('warning', $this->warning);
|
'info' => $this->info,
|
||||||
|
'warning' =>$this->warning,
|
||||||
|
));
|
||||||
|
|
||||||
parent::initContent();
|
parent::initContent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user