Fix missing entry properties passed to 'backend_publish' event hook (Fixes #206)
Some plugins make use of additional entry properties (title, body, extended, author) after being called by the 'backend_publish' hook, e.g. * serendipity_event_forum * serendipity_event_freetag * serendipity_event_ljupdate * serendipity_event_trackback * serendipity_event_versioning * serendipity_event_entryproperties * serendipity_event_mailer * serendipity_event_twitter Thus we need to set these properties in the serendipity_updertEntry() method to make sure the plugins get the required data. Of course, we could fetch the entry either in overview.inc.php or again in each plugin, but that would mean an additional query to the DB.
This commit is contained in:
@ -1415,6 +1415,10 @@ function serendipity_updertEntry($entry) {
|
||||
if ($entry['isdraft'] === 0) {
|
||||
$entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!)
|
||||
$entry['timestamp'] = $_entry['timestamp']; // dashboard publishing a draft shall not set a new entry timestamp
|
||||
$entry['title'] = $_entry['title']; // dashboard publishing a draft does not pass title, body, extended, and author, so we need to set it here
|
||||
$entry['body'] = $_entry['body'];
|
||||
$entry['extended'] = $_entry['extended'];
|
||||
$entry['author'] = $_entry['author'];
|
||||
}
|
||||
|
||||
$entry['last_modified'] = time();
|
||||
|
Reference in New Issue
Block a user