]> git.mjollnir.org Git - moodle.git/commitdiff
One less use of old LIMIT clause. Now logs are working properly.
authorstronk7 <stronk7>
Tue, 5 Sep 2006 21:40:17 +0000 (21:40 +0000)
committerstronk7 <stronk7>
Tue, 5 Sep 2006 21:40:17 +0000 (21:40 +0000)
lib/datalib.php

index 76d651c654f850d2b25d1ea6abdedfdc9d69730a..8bf1395cd49448d4f43269b3d4ea1820fe948b83 100644 (file)
@@ -1650,12 +1650,6 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
 function get_logs($select, $order='l.time DESC', $limitfrom='', $limitnum='', &$totalcount) {
     global $CFG;
 
-    if ($limitfrom !== '') {
-        $limit = sql_paging_limit($limitfrom, $limitnum);
-    } else {
-        $limit = '';
-    }
-
     if ($order) {
         $order = 'ORDER BY '. $order;
     }
@@ -1666,7 +1660,7 @@ function get_logs($select, $order='l.time DESC', $limitfrom='', $limitnum='', &$
     $totalcount = count_records_sql("SELECT COUNT(*) FROM $countsql");
 
     return get_records_sql('SELECT l.*, u.firstname, u.lastname, u.picture
-                                FROM '. $selectsql .' '. $order .' '. $limit);
+                                FROM '. $selectsql .' '. $order, $limitfrom, $limitnum) ;
 }