From 5e44288e1d23b1c27171d827279167d832b90de1 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Sat, 6 May 2006 09:36:20 +0000 Subject: [PATCH] commit bugfix for sqlite by sven oliver moll --- docs/NEWS | 10 ++++++++-- include/functions_images.inc.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 6ebe400..3e7def0 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,5 +1,11 @@ # $Id$ +Version 1.0 () +------------------------------------------------------------------------ + + * Fix media browser sorting by authorid causing trouble in SQLite + (Sven Oliver Moll) + Version 1.0-beta3 (May 5th, 2006) ------------------------------------------------------------------------ @@ -12,8 +18,8 @@ Version 1.0-beta3 (May 5th, 2006) * Add Akismet antispam support (garvinhicking) - * Saving special crafterd configuration data as Admin superuser - could lead to arbitrary PHP code inclusion from + * Saving special crafterd configuration data as Admin superuser + could lead to arbitrary PHP code inclusion from serendipity_config_local.inc.php. Since admins usually already have superuser rights over their files, this is not considered a "real-life" security issue. (garvinhicking) diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index 3524038..c45e9f0 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -71,7 +71,7 @@ function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total, $order $permsql = " WHERE $perm"; } - $query = "SELECT i.*, a.realname AS authorname FROM {$serendipity['dbPrefix']}images AS i LEFT OUTER JOIN {$serendipity['dbPrefix']}authors AS a ON i.authorid = a.authorid $directorysql ORDER BY $order $ordermode $limitsql"; + $query = "SELECT i.*, a.realname AS authorname FROM {$serendipity['dbPrefix']}images AS i LEFT OUTER JOIN {$serendipity['dbPrefix']}authors AS a ON i.authorid = a.authorid $directorysql ORDER BY i.$order $ordermode $limitsql"; $rs = serendipity_db_query($query, false, 'assoc'); if (!is_array($rs)) { return array(); -- 2.39.5