Version 0.9 ()
------------------------------------------------------------------------
+ * Fix showing any entry-id related sidebar plugins, when a selected
+ entry is not visible (permissions/drafts/...) by unsetting the
+ global $serendipity['GET']['id'] in that case. (garvinhicking)
+
* Spamblock plugin can now define required comment fields. Also fix
parameter order in mt_rand() call, thanks to Jens Kubieziel
(garvinhicking)
// User wants to read the diary
case 'read':
if (isset($serendipity['GET']['id'])) {
- serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
+ $entry = serendipity_fetchEntry('id', $serendipity['GET']['id']);
+ if (!is_array($entry) || count($entry) < 1) {
+ unset($serendipity['GET']['id']);
+ $entry = array();
+ }
+
+ serendipity_printEntries($entry, 1);
} else {
serendipity_printEntries(serendipity_fetchEntries($serendipity['range'], true, $serendipity['fetchLimit']));
}