Removed direct references to $_REQUEST and $_POST
This commit is contained in:
@@ -37,13 +37,13 @@ class Model_Email_Template extends ORM_OSB {
|
||||
parent::save();
|
||||
|
||||
// Save our Translated Message
|
||||
if ($x = array_diff_key($_POST,$this->_object) AND ! empty($_POST['language_id']) AND ! empty($_POST['translate']) AND is_array($_POST['translate'])) {
|
||||
$to = $this->translate->where('language_id','=',$_POST['language_id'])->find();
|
||||
if ($x = array_diff_key($_POST,$this->_object) AND Arr::get($_POST,'language_id']) AND is_array(Arr::get($_POST,'translate'))) {
|
||||
$to = $this->translate->where('language_id','=',Arr::get($_POST,'language_id'))->find();
|
||||
|
||||
// For a new entry, we need to set the product_id
|
||||
if (! $to->loaded()) {
|
||||
$to->product_id = $this->id;
|
||||
$to->language_id = $_POST['language_id'];
|
||||
$to->language_id = Arr::get($_POST,'language_id');
|
||||
}
|
||||
|
||||
$to->values($x['translate'])->save();
|
||||
|
Reference in New Issue
Block a user