Lines Matching refs:comment

254                     $comment['user']['id'] = $INPUT->server->str('REMOTE_USER');
255 $comment['user']['name'] = $INFO['userinfo']['name'];
256 $comment['user']['mail'] = $INFO['userinfo']['mail'];
268 … $comment['user']['id'] = ''; //prevent overlap with loggedin users, before: 'test<ipadress>'
269 $comment['user']['name'] = hsc($INPUT->str('name'));
270 $comment['user']['mail'] = hsc($INPUT->str('mail'));
273 … $comment['user']['address'] = ($this->getConf('addressfield')) ? hsc($INPUT->str('address')) : '';
274 … $comment['user']['url'] = ($this->getConf('urlfield')) ? $this->checkURL($INPUT->str('url')) : '';
275 … $comment['subscribe'] = ($this->getConf('subscribe')) ? $INPUT->has('subscribe') : '';
276 $comment['date'] = ['created' => $INPUT->str('date')];
277 $comment['raw'] = cleanText($INPUT->str('text'));
280 $comment['show'] = false;
282 $comment['show'] = true;
284 $this->add($comment, $reply);
507 * @param array $comment with
522 protected function add($comment, $parent) argument
527 $TEXT = $comment['raw'];
536 && $comment['user']['id'] != $INPUT->server->str('REMOTE_USER')
562 if ($comment['date']['created']) {
563 $date = strtotime($comment['date']['created']);
572 $cid = md5($comment['user']['id'] . $date); // create a unique id
579 $xhtml = $this->renderComment($comment['raw']);
583 'user' => $comment['user'],
585 'raw' => $comment['raw'],
589 'show' => $comment['show']
592 if ($comment['subscribe']) {
593 $mail = $comment['user']['mail'];
780 $comment = $data['comments'][$cid];
783 if (!is_array($comment)) {
788 if ($comment['parent'] != $parent) {
793 if (!$comment['show'] && !$this->helper->isDiscussionModerator()) {
816 $comment = $data['comments'][$cid];
820 if (!$comment['show'] || !$isVisible) {
833 if (is_array($comment['user'])) { // new format
834 $user = $comment['user']['id'];
835 $name = $comment['user']['name'];
836 $mail = $comment['user']['mail'];
837 $url = $comment['user']['url'];
838 $address = $comment['user']['address'];
840 $user = $comment['user'];
841 $name = $comment['name'];
842 $mail = $comment['mail'];
843 $url = $comment['url'];
844 $address = $comment['address'];
846 if (is_array($comment['date'])) { // new format
847 $created = $comment['date']['created'];
848 $modified = $comment['date']['modified'] ?? null;
850 $created = $comment['date'];
851 $modified = $comment['edited'];
904 echo ($HIGH ? html_hilight($comment['xhtml'], $HIGH) : $comment['xhtml']) . DOKU_LF;
911 if ($data['status'] == 1 && !$reply && $comment['show']
921 … $label = ($comment['show'] ? $this->getLang('btn_hide') : $this->getLang('btn_show'));
955 $comment = $data['comments'][$cid];
956 if (!empty($comment['replies'])) {
960 $isVisible = ($comment['show'] && $isVisible);
961 foreach ($comment['replies'] as $rid) {
1337 * @param array $comment data array of the new comment
1343 protected function notify($comment, &$subscribers) argument
1360 'DATE' => dformat($comment['date']['created'], $conf['dformat']),
1361 'NAME' => $comment['user']['name'],
1362 'TEXT' => $comment['raw'],
1363 'COMMENTURL' => wl($ID, '', true) . '#comment_' . $comment['cid'],
1469 foreach ($data['comments'] as $comment) {
1470 if ($comment['parent']) continue;
1471 if (!$comment['show']) continue;
1474 $rids = $comment['replies'];
1779 $comment = $data['comments'][$cid];
1781 if (!is_array($comment)) return false; // corrupt datatype
1782 if ($comment['parent'] != $parent) return false; // reply to an other comment
1783 if (!$comment['show']) return false; // hidden comment
1785 $text = PhpString::strtolower($comment['raw']);
1790 if (is_array($comment['replies'])) { // and the replies
1791 foreach ($comment['replies'] as $rid) {
1858 $comment = $data['comments'][$cid];
1860 if (!is_array($comment)) return ''; // corrupt datatype
1861 if ($comment['parent'] != $parent) return ''; // reply to an other comment
1862 if (!$comment['show']) return ''; // hidden comment
1864 $text = $comment['raw']; // we only add the raw comment text
1865 if (is_array($comment['replies'])) { // and the replies
1866 foreach ($comment['replies'] as $rid) {