Make sure favorite portlet passes type check, fixes custom type templates missing on home

This commit is contained in:
Nathan Gray 2015-02-24 19:29:47 +00:00
parent 2a939d0c6f
commit 56dff42c14

View File

@ -63,6 +63,16 @@ class infolog_favorite_portlet extends home_favorite_portlet
*/ */
public static function get_rows(&$query, &$rows, &$readonlys) public static function get_rows(&$query, &$rows, &$readonlys)
{ {
// Make sure we pass the type check
if ($query['col_filter']['info_type'])
{
$tpl = new etemplate_new;
if ($tpl->read('infolog.index.rows.'.$query['col_filter']['info_type']))
{
$query['template'] = $tpl->name;
$query['custom_fields'] = true; // read the custom fields too
}
}
$ui = new infolog_ui(); $ui = new infolog_ui();
$total = $ui->get_rows($query, $rows, $readonlys); $total = $ui->get_rows($query, $rows, $readonlys);
// infolog_ui overwrites what we set in constructor // infolog_ui overwrites what we set in constructor