Removed direct references to $_REQUEST and $_POST

This commit is contained in:
Deon George
2016-08-03 16:20:25 +10:00
parent 5f84d2c14f
commit 7adcd1d983
24 changed files with 85 additions and 85 deletions

View File

@@ -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();