I've looked at the EE Channel Entries API docs, but the save_entry function does not seem to actually update an existing entry, but rather saves a new new entry over it. This seems to be the case as any fields not specified in the $data array get wiped out and the entry_date is changed to the date the update was made.
Is there a way to simply edit/update an entry without the entry_date being changed, yet still triggering the edit notice in the EE system? I am able to update single fields using the codeigniter db class, but doing it this way does not trigger EE's system to notice that the entry has been edited.
The main reason I want to do this is to use Postmaster's email trigger on entry edit, but doing a manual db update will not trigger this. My plugin code for the channel entries API update is below:
ee()->load->library('api');
ee()->api->instantiate('channel_entries');
$data = array(
'title' => $some_title,
'url_title' => $some_url_title,
'field_id_17' => $some_variable,
);
ee()->api_channel_entries->save_entry($data, 4, $entry_id, FALSE);
/*
* The number 4 in the parameters is the channel_id number where the entry is stored.
* I have also tried using NULL in place of 4 but it then throws an error saying
* I'm missing an API parameter.
*/
I would also not mind it if I could just use the codeigniter db class to update the entries, then somehow tell the EE system that the entry has been updated. Is this sort of thing possible?
$entry_id
is populated and correct?