* Calendar: initial load speed improvement

Skip the server-side get_rows() call to get to the UI faster it not on listview
This commit is contained in:
nathangray 2020-02-21 11:20:04 -07:00
parent 1738c07d4a
commit e99c3368e6

View File

@ -150,6 +150,12 @@ class calendar_uilist extends calendar_ui
}
$content['nm']['actions'] = $this->get_actions();
// Skip first load if view is not listview
if($this->view && $this->view !== 'listview')
{
$content['nm']['num_rows'] = 0;
}
if (isset($_GET['filter']) && in_array($_GET['filter'],array_keys($this->date_filters)))
{
$content['nm']['filter'] = $_GET['filter'];