From 9bd29925cd7cf03953dd56965da04ee28cf73734 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 14 Jan 2015 20:25:05 +0000 Subject: [PATCH] infolog_ui changes default_cols in get_rows, so we change it back. --- infolog/inc/class.infolog_favorite_portlet.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_favorite_portlet.inc.php b/infolog/inc/class.infolog_favorite_portlet.inc.php index b207a4a76d..3408687ac1 100644 --- a/infolog/inc/class.infolog_favorite_portlet.inc.php +++ b/infolog/inc/class.infolog_favorite_portlet.inc.php @@ -17,6 +17,9 @@ class infolog_favorite_portlet extends home_favorite_portlet { + // Infolog app helpfully overwrites what we set in constructor + protected static $default_cols = 'info_type_info_status_info_percent,linked_info_priority_info_subject_info_id_info_des_info_datemodified,info_startdate_info_enddate_info_datecompleted'; + /** * Construct the portlet * @@ -40,7 +43,7 @@ class infolog_favorite_portlet extends home_favorite_portlet 'get_rows' => 'infolog_favorite_portlet::get_rows', // Use a different template so it can be accessed from client side 'template' => 'infolog.home', - 'default_cols' => 'info_type_info_status_info_percent,linked_info_priority_info_subject_info_id_info_des_info_datemodified,info_startdate_info_enddate_info_datecompleted', + 'default_cols' => self::$default_cols, // Don't overwrite infolog 'session_for' => 'home', 'no_filter2' => true, @@ -62,6 +65,8 @@ class infolog_favorite_portlet extends home_favorite_portlet { $ui = new infolog_ui(); $total = $ui->get_rows($query, $rows, $readonlys); + // infolog_ui overwrites what we set in constructor + $query['default_cols'] = self::$default_cols; unset($GLOBALS['egw_info']['flags']['app_header']); return $total; }