]> git.mjollnir.org Git - moodle.git/commitdiff
search: removed dbtype-specific select - MySQL can now handle grownup syntax
authormartinlanghoff <martinlanghoff>
Tue, 26 Sep 2006 05:09:26 +0000 (05:09 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 26 Sep 2006 05:09:26 +0000 (05:09 +0000)
search/documents/forum_document.php

index 0dacc209382000409cd72f7142b9151afca6e838..e447a53f44c21417cb7d6c1ec2e22614695c86b7 100644 (file)
       }
     }
 
-    if ($CFG->dbtype == 'postgres7') {
-        return get_recordset_sql("SELECT p.id, p.subject, p.discussion, p.message,
+    return get_recordset_sql("SELECT p.id, p.subject, p.discussion, p.message,
                                   p.deleted, d.groupid, u.firstname, u.lastname
                               FROM {$CFG->prefix}forum_discussions d
                               JOIN {$CFG->prefix}forum_posts p ON p.discussion = d.id
                                AND p.parent = 0
                                    $timelimit
                           ORDER BY d.timemodified DESC");
-    } else {
-        return get_recordset_sql("SELECT p.id, p.subject, p.discussion, p.message, p.deleted,
-                                  d.groupid, u.firstname, u.lastname
-                              FROM ({$CFG->prefix}forum_posts p,
-                                   {$CFG->prefix}user u,
-                                   {$CFG->prefix}forum_discussions d)
-                             WHERE d.forum = '$forum'
-                               AND p.discussion = d.id
-                               AND p.parent = 0
-                               AND p.userid = u.id $timelimit
-                          ORDER BY d.timemodified DESC");
-    } //else
   } //forum_get_discussions_fast
 
   //reworked faster version from /mod/forum/lib.php