From de8c0481d93813d7566c291848c29366742e2ae1 Mon Sep 17 00:00:00 2001 From: gabrieljenik Date: Thu, 27 Mar 2014 19:26:41 -0300 Subject: [PATCH] Update GroupGridView.php Fix: Providing right context for the evaluation of the column value. Although the code is well copied from renderDataCell in framework/zii/widgets/grid/CGridColumn.php#135, the data variable is not in the same scope. First line in original code is missing: $data=$this->grid->dataProvider->data[$row]; I added a similar one. --- GroupGridView.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GroupGridView.php b/GroupGridView.php index 2e1f5a9..76cc99e 100644 --- a/GroupGridView.php +++ b/GroupGridView.php @@ -293,8 +293,10 @@ private function renderExtraRow($row, $totals) * @param mixed $row * @param mixed $data */ - private function getDataCellContent($column, $data, $row) + public static function getDataCellContent($column, $array_data, $row) { + $data = $array_data[$row]; + if($column->value!==null) $value=$column->evaluateExpression($column->value, array('data'=>$data,'row'=>$row)); else if($column->name!==null)