From 71c460886aa1cc7fec599702cf6d4947df8cd4c4 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Fri, 3 Nov 2006 16:41:52 +0000 Subject: [PATCH] Shuffle trackback logic to the end of entry-save process. Thanks to isotopp. --- docs/NEWS | 4 ++++ include/functions_entries.inc.php | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index 9061e12..6f3013d 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 1.1 () ------------------------------------------------------------------------ + * Move trackback sending logic to the end when saving an entry. + Should get rid of event plugins not operating when trackbacks + painfully fail. Thanks to isotopp (garvinhicking) + * Portuguese translation update by Angel * Fixed bug that prevented native imports from other blog system diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index ac2e5db..4632409 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1237,7 +1237,6 @@ function serendipity_updertEntry($entry) { if (!serendipity_db_bool($entry['isdraft'])) { serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true, 'from' => 'functions_entries:updertEntry')); - serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry); } serendipity_purgeEntry($entry['id'], $entry['timestamp']); @@ -1251,6 +1250,10 @@ function serendipity_updertEntry($entry) { serendipity_plugin_api::hook_event('backend_save', $entry, $newEntry); } + if (!serendipity_db_bool($entry['isdraft'])) { + serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry); + } + return (int)$entry['id']; } -- 2.39.5