]> git.mjollnir.org Git - s9y.git/commitdiff
commit bugfix for sqlite by sven oliver moll
authorgarvinhicking <garvinhicking>
Sat, 6 May 2006 09:36:20 +0000 (09:36 +0000)
committergarvinhicking <garvinhicking>
Sat, 6 May 2006 09:36:20 +0000 (09:36 +0000)
docs/NEWS
include/functions_images.inc.php

index 6ebe400a0944795a47cae87dfef1d19b339221af..3e7def074312e5372a54ad79f7c812264039f7f4 100644 (file)
--- 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)
index 352403845cf1a2079d9f609e08b715feb516aad4..c45e9f0f20c9a7fceae0fdeacc83de513c393ac0 100644 (file)
@@ -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();