/** * Save the changed translations */ function saveObject() { // prepare the values to be saved $save_array = array(); $remarks_array = array(); foreach ($_POST as $key => $value) { $keys = explode($this->lng->separator, ilUtil::stripSlashes($key, false)); if (count($keys) == 2) { // avoid line breaks $value = preg_replace("/(\r\n)|(\r)|(\n)/", "<br />", $value); $value = ilUtil::stripSlashes($value, false); $save_array[$key] = $value; $remarks_array[$key] = $_POST[$key . $this->lng->separator . "comment"]; } } // save the translations ilObjLanguageExt::_saveValues($this->object->key, $save_array, $remarks_array); // view the list $this->viewObject(); }