@@ -179,10 +185,8 @@
));
break;
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_SELECTION:
- $selections = array();
$selected = '';
foreach ($circularNoticeChoice as $choice) :
- $selections[$choice['id']] = $choice['value'];
if ($choice['id'] === $myAnswer['CircularNoticeTargetUser']['reply_selection_value']) :
$selected = $choice['id'];
endif;
@@ -197,11 +201,9 @@
));
break;
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_MULTIPLE_SELECTION:
- $selections = array();
$selected = explode(CircularNoticeComponent::SELECTION_VALUES_DELIMITER, $myAnswer['CircularNoticeTargetUser']['reply_selection_value']);
$selectedValue = array();
foreach ($circularNoticeChoice as $choices) :
- $selections[$choices['id']] = $choices['value'];
if (in_array($choices['id'], $selected, true)) :
$selectedValue[] = $choices['value'];
endif;
@@ -331,7 +333,7 @@
$answer = null;
switch ($circularNoticeContent['reply_type']) {
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_TEXT:
- $answer = nl2br(h($circularNoticeTargetUser['CircularNoticeTargetUser']['reply_text_value']));
+ $answer = $circularNoticeTargetUser['CircularNoticeTargetUser']['reply_text_value'];
break;
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_SELECTION:
case CircularNoticeComponent::CIRCULAR_NOTICE_CONTENT_REPLY_TYPE_MULTIPLE_SELECTION:
@@ -362,7 +364,7 @@
$this->NetCommonsHtml->handleLink($circularNoticeTargetUser, array('avatar' => true), array(), 'User'),
array($readDatetime, array('class' => 'row-datetime')),
array($replyDatetime, array('class' => 'row-datetime')),
- array(h($answer), array('class' => 'circular-notices-reply-col circular-notices-word-break')),
+ array(nl2br(h($answer)), array('class' => 'circular-notices-reply-col circular-notices-word-break')),
));
endforeach;
?>
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index c0bacd0..1154cd3 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,9 +3,6 @@
-
-
-
app/Plugin/CircularNotices
@@ -20,5 +17,6 @@
+