From 910dd6a77a52579d75bcd9bd4ca91ee7a62993cd Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 12 Apr 2016 13:17:38 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=81=8C=E3=81=84=E3=81=AA=E3=81=84=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=80=81=E7=A9=BA=E7=99=BD=E3=82=92=E6=88=BB=E3=81=99?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Helper/DisplayUserHelper.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/View/Helper/DisplayUserHelper.php b/View/Helper/DisplayUserHelper.php index 0d13150..3f9f3e8 100644 --- a/View/Helper/DisplayUserHelper.php +++ b/View/Helper/DisplayUserHelper.php @@ -41,6 +41,10 @@ class DisplayUserHelper extends AppHelper { public function handleLink($user, $attributes = array(), $options = array(), $model = 'TrackableCreator') { $html = ''; $handlename = $this->handle($user, $attributes, $model); + if (! $handlename) { + return $html; + } + $attributes = Hash::remove($attributes, 'avatar'); if (Hash::get($user, 'ngModel')) { @@ -76,6 +80,10 @@ public function handleLink($user, $attributes = array(), $options = array(), $mo public function handle($user, $attributes = array(), $model = 'TrackableCreator') { $handlename = ''; + if (! Hash::get($user, $model . '.handlename')) { + return ''; + } + if (Hash::get($user, 'ngModel')) { if (Hash::get($attributes, 'avatar')) { $attributes = Hash::remove($attributes, 'avatar');