From 19bffa38c8240ef92f9ab6b466e7cb2ca25f651c Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 26 Nov 2013 08:44:57 -0500 Subject: [PATCH] Fixes #1326: DetailView: visibility of the attribute --- framework/yii/widgets/DetailView.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/yii/widgets/DetailView.php b/framework/yii/widgets/DetailView.php index 43d5a3e..a97bc20 100644 --- a/framework/yii/widgets/DetailView.php +++ b/framework/yii/widgets/DetailView.php @@ -186,6 +186,10 @@ class DetailView extends Widget throw new InvalidConfigException('The attribute configuration must be an array.'); } + if (isset($attribute['visible']) && !$attribute['visible']) { + continue; + } + if (!isset($attribute['format'])) { $attribute['format'] = 'text'; }