/** * Updates the attachment titles. */ function convert_to_storage() { foreach ($this->attachments as $identifier => $copy) { $this->update_attachment_title($identifier, $this->title); } return parent::convert_to_storage(); }
/** * Updates the attachment titles. */ function convert_to_storage() { if ($this->_instance_mode === 'single' && !empty($this->title)) { foreach ($this->attachments as $identifier => $copy) { if ($copy->title === $this->title) { continue; } $this->update_attachment_title($identifier, $this->title); } } return parent::convert_to_storage(); }