Lines Matching refs:cid

248         $cid = $INPUT->str('cid');
289 $this->save([$cid], $raw);
293 $this->save([$cid], '');
297 $this->save([$cid], '', 'toogle');
312 $cid = $INPUT->str('cid');
314 if (!$cid) {
315 $cid = $INPUT->str('reply');
320 $this->showDiscussionSection(null, $cid);
323 $this->showDiscussionSection($cid);
331 * @param string $cid comment id
333 protected function redirect($cid) argument
348 $url = wl($ID) . '#comment_' . $cid;
454 foreach ($data['comments'] as $cid => $value) {
455 if ($cid == $edit) { // edit form
458 $this->showCommentWithReplies($cid, $data, '', $reply);
493 foreach ($cids as $cid) {
494 if (!empty($comments[$cid]['replies'])) {
495 $rids = $comments[$cid]['replies'];
497 $comments[$cid]['replies'] = [];
499 $comments[$cid]['parent'] = '';
572 $cid = md5($comment['user']['id'] . $date); // create a unique id
582 $data['comments'][$cid] = [
617 $data['comments'][$parent]['replies'][] = $cid;
624 $data['comments'][$cid]['cid'] = $cid;
625 $this->notify($data['comments'][$cid], $data['subscribers']);
629 $this->addLogEntry($date, $ID, 'cc', '', $cid);
631 $this->redirect($cid);
671 foreach ($cids as $cid) {
673 if (is_array($data['comments'][$cid]['user'])) {
674 $user = $data['comments'][$cid]['user']['id'];
677 $user = $data['comments'][$cid]['user'];
690 $data['comments'][$cid]['user'] = [
692 'name' => $data['comments'][$cid]['name'],
693 'mail' => $data['comments'][$cid]['mail'],
694 'url' => $data['comments'][$cid]['url'],
695 'address' => $data['comments'][$cid]['address'],
697 $data['comments'][$cid]['date'] = [
698 'created' => $data['comments'][$cid]['date']
703 $now = $data['comments'][$cid]['show'];
704 $data['comments'][$cid]['show'] = !$now;
707 $type = ($data['comments'][$cid]['show'] ? 'sc' : 'hc');
710 $data['comments'][$cid]['show'] = true;
716 $data['comments'][$cid]['show'] = false;
722 $data['comments'] = $this->removeComment($cid, $data['comments']);
731 $data['comments'][$cid]['date']['modified'] = $date;
732 $data['comments'][$cid]['raw'] = $raw;
733 $data['comments'][$cid]['xhtml'] = $xhtml;
741 $this->addLogEntry($date, $ID, $type, '', $cid);
743 $this->redirect($cid);
750 * @param string $cid comment id to be removed
754 protected function removeComment($cid, $comments) argument
756 if (is_array($comments[$cid]['replies'])) {
757 foreach ($comments[$cid]['replies'] as $rid) {
761 unset($comments[$cid]);
768 * @param string $cid comment id
774 …protected function showCommentWithReplies($cid, &$data, $parent = '', $reply = '', $isVisible = tr… argument
777 if (!isset($data['comments'][$cid])) {
780 $comment = $data['comments'][$cid];
798 $this->showComment($cid, $data, $reply, $isVisible);
800 $this->showReplies($cid, $data, $reply, $isVisible);
802 $this->showReplyForm($cid, $reply);
808 * @param string $cid comment id
813 protected function showComment($cid, $data, $reply, $isVisible) argument
816 $comment = $data['comments'][$cid];
823 if($cid === $reply) {
829 ptln('<a name="comment_' . $cid . '" id="comment_' . $cid . '"></a>', 8);
915 $this->showButton($cid, $this->getLang('btn_reply'), 'reply', true);
920 $this->showButton($cid, $lang['btn_secedit'], 'edit', true);
922 $this->showButton($cid, $label, 'toogle');
923 $this->showButton($cid, $lang['btn_delete'], 'delete');
933 * @param string $cid current comment id
936 protected function showReplyForm($cid, $reply) argument
938 if ($this->getConf('usethreading') && $reply == $cid) {
940 $this->showCommentForm('', 'add', $cid);
948 * @param string $cid comment id
953 protected function showReplies($cid, &$data, $reply, &$isVisible) argument
955 $comment = $data['comments'][$cid];
962 $this->showCommentWithReplies($rid, $data, $cid, $reply, $isVisible);
1018 * @param string|null $cid comment id to be responded to or null
1020 protected function showCommentForm($raw, $act, $cid = null) argument
1051 <input type="hidden" name="reply" value="<?php echo $cid ?>"/>
1120 <input type="hidden" name="cid" value="<?php echo $cid ?>"/>
1178 <?php if ($cid) { ?>
1179 …<a class="button comment_cancel" href="<?php echo wl($ID) . '#comment_' . $cid ?>" ><?php echo $la…
1193 * @param string $cid comment id
1198 protected function showButton($cid, $label, $act, $jump = false) argument
1214 <input type="hidden" name="cid" value="<?php echo $cid ?>"/>
1755 foreach ($data['comments'] as $cid => $value) {
1756 $matched = $this->phraseMatchInComment($event->data['phrase'], $cid, $data);
1770 * @param string $cid comment id
1775 protected function phraseMatchInComment($phrase, $cid, &$data, $parent = '') argument
1777 if (!isset($data['comments'][$cid])) return false; // comment was removed
1779 $comment = $data['comments'][$cid];
1792 if ($this->phraseMatchInComment($phrase, $rid, $data, $cid)) {
1848 * @param string $cid comment id
1853 protected function addCommentWords($cid, &$data, $parent = '') argument
1856 if (!isset($data['comments'][$cid])) return ''; // comment was removed
1858 $comment = $data['comments'][$cid];
1867 $text .= $this->addCommentWords($rid, $data, $cid);