Skip to content

Commit

Permalink
One less use of old LIMIT clause. Now logs are working properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 5, 2006
1 parent dbe7e58 commit 93a8922
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/datalib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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) ;
}


Expand Down

0 comments on commit 93a8922

Please sign in to comment.