Version 0.9 ()
------------------------------------------------------------------------
+ * Fix editing a draft article to be properly displayed as draft
+ in PostgreSQL setups. Thanks to Penny Leach! (garvinhicking)
+
* Localized the string "Reply" which occured inside some templates.
(s/Reply/{$CONST.REPLY}/) (garvinhicking)
return $res;
}
- if ($entry['isdraft'] == 'false') {
+ if (!serendipity_db_bool($entry['isdraft'])) {
serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true));
serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry);
}
// Send publish tags if either a new article has been inserted from scratch, or if the entry was previously
// stored as draft and is now published
- if ($entry['isdraft'] == 'false' && ($newEntry || $_entry['isdraft'] == 'true')) {
+ if (!serendipity_db_bool($entry['isdraft']) && ($newEntry || serendipity_db_bool($_entry['isdraft']))) {
serendipity_plugin_api::hook_event('backend_publish', $entry, $newEntry);
} else {
serendipity_plugin_api::hook_event('backend_save', $entry, $newEntry);
serendipity_plugin_api::hook_event('backend_entryform', $entry);
- if ( (isset($entry['isdraft']) && $entry['isdraft'] == 'true') ||
+ if ( (isset($entry['isdraft']) && serendipity_db_bool($entry['isdraft'])) ||
(!isset($entry['isdraft']) && $serendipity['publishDefault'] == 'draft') ) {
$draftD = ' selected="selected"';
} else {