- if (!is_null($setting) && $this->changed[$field]) {
- $setting->save($this, $field, $this->values[$field]);
- }
- if ($this->changed[$field] && @$this->watched[$field]) {
- WatchProfileUpdate::register($this->profile, $field);
+ if ($this->changed[$field]) {
+ if (!is_null($setting)) {
+ $changedFields[$field] = array(
+ str_replace("\n", " - ", $setting->getText($this->orig[$field])),
+ str_replace("\n", " - ", $setting->getText($this->values[$field])),
+ );
+ } else {
+ $changedFields[$field] = array(
+ str_replace("\n", " - ", $this->orig[$field]),
+ str_replace("\n", " - ", $this->values[$field]),
+ );
+ }
+ if (!is_null($setting)) {
+ $setting->save($this, $field, $this->values[$field]);
+ }
+ if (isset($this->watched[$field]) && $this->watched[$field]) {
+ WatchProfileUpdate::register($this->profile, $field);
+ }