Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

added Rich Text to saved data; changed how Entry Model is fetched #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nateclonch
Copy link

This addresses issue #16

@@ -59,7 +59,7 @@ public function onBeforeSaveEntry(Event $event)
if (!$event->params['isNewEntry']) {

// Get old entry from db
$entry = EntryModel::populateModel(EntryRecord::model()->findById($id));
$entry = EntryModel::populateModel(craft()->entries->getEntryById($id));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When fetching entries like this, you don't have to populate the entrymodel

@@ -116,6 +116,12 @@ public function parseFieldData($handle, $data)

break;

case 'RichText':
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add AuditLogModel::FieldTypeRichText and use that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants