From: garvinhicking Date: Mon, 10 Oct 2005 16:53:45 +0000 (+0000) Subject: Fix a bug in possible duplicate column naming X-Git-Tag: 0.9~79 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c48ac35cb5d2157ae27395e7dbe8df3b89df56f7;p=s9y.git Fix a bug in possible duplicate column naming --- diff --git a/docs/NEWS b/docs/NEWS index 27d7365..afb7a05 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 0.9-beta2 () ------------------------------------------------------------------------ + * Fix a bug in the fetchEntry() function which can lead to wrong + author/authorid settings when editing an existing entry. Thanks to + Martin Eichenberg! (garvinhicking) + * The output of the category plugin can now be styled via Smarty templating (plugin_categories.tpl) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 10f2c44..7897ed3 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -342,8 +342,20 @@ function serendipity_fetchEntry($key, $val, $full = true, $fetchDrafts = 'false' serendipity_plugin_api::hook_event('frontend_fetchentry', $cond, array('noSticky' => true)); - $querystring = "SELECT - *, + $querystring = "SELECT e.id, + e.title, + e.timestamp, + e.body, + e.comments, + e.trackbacks, + e.extended, + e.exflag, + e.authorid, + e.isdraft, + e.allow_comments, + e.last_modified, + e.moderate_comments, + a.realname AS author, a.email FROM