Exemplo n.º 1
0
 /**
  * Save entry version.
  *
  * @param int $history
  * @param int $entry
  */
 public function version($history, $entry)
 {
     // Get previous version
     $version = end(craft()->entryRevisions->getVersionsByEntryId($entry, false, 2));
     // Save
     $log = new Import_EntriesRecord();
     $log->historyId = $history;
     $log->entryId = $entry;
     $log->versionId = $version ? $version->versionId : null;
     $log->save(false);
 }