Fix broken avatar URL in invitation

This commit is contained in:
Dmitriy Simushev 2015-03-24 15:29:18 +00:00
parent 2031d82600
commit a3f68852ce

View File

@ -120,16 +120,16 @@ class WidgetController extends AbstractController
$operator_name = ($locale == get_home_locale()) $operator_name = ($locale == get_home_locale())
? $operator['vclocalename'] ? $operator['vclocalename']
: $operator['vccommonname']; : $operator['vccommonname'];
$avatar_url = $operator['vcavatar']
? $this->asset($operator['vcavatar'], AssetUrlGeneratorInterface::ABSOLUTE_URL)
: false;
// Show invitation dialog at widget side // Show invitation dialog at widget side
$response_data['handlers'][] = 'invitationCreate'; $response_data['handlers'][] = 'invitationCreate';
$response_data['dependencies']['invitationCreate'] = array(); $response_data['dependencies']['invitationCreate'] = array();
$response_data['data']['invitation'] = array( $response_data['data']['invitation'] = array(
'operatorName' => htmlspecialchars($operator_name), 'operatorName' => htmlspecialchars($operator_name),
'avatarUrl' => htmlspecialchars($this->asset( 'avatarUrl' => htmlspecialchars($avatar_url),
$operator['vcavatar'],
AssetUrlGeneratorInterface::ABSOLUTE_URL
)),
'threadUrl' => $this->generateUrl( 'threadUrl' => $this->generateUrl(
'chat_user_invitation', 'chat_user_invitation',
array(), array(),