You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
History list loads the whole history table and sorts on a column that doesn't exist #477
$history->loadAll('history_datetime', $where) loads every history row for the chosen table (no date range, no LIMIT), then runs one phpGACL query per row in PHP to drop the ones the user can't view. On a busy install this is tens of thousands of rows and queries per page view.
The order column is history_datetime, but the column is history_date. loadAll() only sorts when the property exists, so the ORDER BY is silently dropped and rows come back in storage order.
Fix: query with history_date ordering, paginate in SQL, and filter by permission in SQL (join the allowed-items lists per module) instead of row by row. The API's /history endpoint needs the same query.
Found by reading the code on dev-5.0.0 @ 179b4eaf; not yet reproduced on a running install.
Activity
History list: filter by permission and paginate in SQL