Pass through to provider CommentAdminSession.update_comment
774668
def save_comment(self, comment_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if comment_form.is_for_update():
            return self.update_comment(comment_form, *args, **kwargs)
        else:
            return self.create_comment(comment_form, *args, **kwargs)
233443
def addcomment(self, comment, private=False):
        
        # Note: fedora bodhi uses this function
        vals = self.bugzilla.build_update(comment=comment,
                                          comment_private=private)
        log.debug("addcomment: update=%s", vals)

        return self.bugzilla.update_bugs(self.bug_id, vals)
1104941
public function updateCommentIfNewest($bundle, $key, $comment, \DateTime $lastModification, $projectId = null)
    {
        $projectId = $projectId ?: $this->project_id;

        return $this->callService($this->url_plan['update_comment_if_newest'], array(
                'project_id'        => $projectId,
                'bundle'            => $bundle,
                'key'               => $key,
                'comment'           => $comment,
                'last_modification' => $lastModification->format('c'),

            )
        );
    }
572278
function getConditionalComment(comment, modify, options) {
    var START_IF = '^\\s*\\[if .*\\]>',
        END_IF = '<!\\[endif\\]\\s*$',
        matchedStartIF = comment.match(new RegExp(START_IF)),
        matchedEndIF = comment.match(new RegExp(END_IF));

    if (comment.match(new RegExp(START_IF + '\\s*$')) || comment.match(new RegExp(START_IF + '<!\\s*$')) ||
            comment.match(new RegExp('^' + END_IF))) {
        return comment.trim();
    }

    if (matchedStartIF && matchedEndIF) {
        var start = matchedStartIF[0],
            end = matchedEndIF[0],
            modified = modify(comment.substring(start.length, matchedEndIF.index), options);

        return (start + modified + end).trim();
    }
}
1198711
def _add_comments(self, comments, original_string=""):
        
        return comments and "{0}  # {1}".format(self._strip_comments(original_string)[0],
                                                "; ".join(comments)) or original_string
377003
protected function _updateObject( $comment_id, $fields ) {
		$fields['comment_ID'] = $comment_id;
		$updated = (bool) wp_update_comment( $this->_addSlashesDeep( $fields ) );
		if ( $updated ) {
			$this->_debug( 'Updated comment ' . $comment_id );
		} else {
			$this->_debug( 'Update failed for comment ' . $comment_id );
		}

		return $updated;
	}
658948
public function updateCommentsCount(PostInterface $post = null)
    {
        $commentTableName = $this->getObjectManager()->getClassMetadata($this->getClass())->table['name'];
        $postTableName = $this->getObjectManager()->getClassMetadata($this->postManager->getClass())->table['name'];

        $this->getConnection()->beginTransaction();
        $this->getConnection()->query($this->getCommentsCountResetQuery($postTableName));

        $this->getConnection()->query($this->getCommentsCountQuery($postTableName, $commentTableName));

        $this->getConnection()->commit();
    }
444506
def _add_comment(self, thing_id, text):
        
        def add_comment_helper(self, thing_id, text):
            data = {'thing_id': thing_id,
                    'text': text}
            retval = self.request_json(self.config['comment'], data=data,
                                       retry_on_error=False)
            return retval

        if thing_id.startswith(self.config.by_object[objects.Message]):
            decorator = decorators.restrict_access(scope='privatemessages')
        else:
            decorator = decorators.restrict_access(scope='submit')
        retval = decorator(add_comment_helper)(self, thing_id, text)
        # REDDIT: reddit's end should only ever return a single comment
        return retval['data']['things'][0]
120115
public function updateComment()
    {
        $newComment = $_POST['comment'] ?? null;
        $commentId = $_POST['commentId'] ?? null;

        if (!$newComment || !$commentId || !$comment = get_comment($commentId)) {
            wp_send_json_error('Missing variables');
        }

        if (!current_user_can('edit_comment', $comment->comment_ID) && !($comment->user_id == get_current_user_id())) {
            wp_send_json_error('Missing authorization');
        }

        // Validate nonce
        if (!check_ajax_referer("update-comment_$comment->comment_ID", 'nonce', false)) {
            wp_send_json_error('Nonce failed');
        }

        $comment->comment_content = $newComment;
        if (wp_update_comment((array) $comment)) {
            wp_send_json_success('Update was successful');
        }

        wp_send_json();
    }
339325
def cli(ctx, comment, metadata=""):
    
    return ctx.gi.cannedcomments.add_comment(comment, metadata=metadata)
910630
def update(self, id, data):
        
        self.db.execute([
            'UPDATE comments SET',
            ','.join(key + '=' + '?' for key in data),
            'WHERE id=?;'],
            list(data.values()) + [id])

        return self.get(id)
194573
def update_cache_counters
      commenter_has_comments = commenter.respond_to?(:comments)

      # Role-specific counter
      role_method = :"#{self.role}_comments_count="
      commentable.send role_method, commentable.comments.where(role: self.role).count if commentable.respond_to?(role_method)
      commenter.send role_method, commenter.comments.where(role: self.role).count if commenter_has_comments && commenter.respond_to?(role_method)

      # Global counter
      total_method = :comments_count=
      commentable.send total_method, commentable.comments.count if commentable.respond_to?(total_method)
      commenter.send total_method, commenter.comments.count if commenter_has_comments && commenter.respond_to?(total_method)

      commentable.save(validate: false)
      commenter.save(validate: false)
    end
227697
def add_comment(self, post=None, name=None, email=None, pub_date=None,
                    website=None, body=None):
        
        if post is None:
            if not self.posts:
                raise CommandError("Cannot add comments without posts")
            post = self.posts[-1]
        post["comments"].append({
            "user_name": name,
            "user_email": email,
            "submit_date": pub_date,
            "user_url": website,
            "comment": body,
        })
850612
def save(self, *args, **kwargs):
        
        # the following lines determines if the comment is being created or not
        # in case the comment exists the pk attribute is an int
        created = type(self.pk) is not int

        super(UpdateCountsMixin, self).save(*args, **kwargs)

        # this operation must be performed after the parent save
        if created:
            self.update_count()
1291695
function setServerComment($comment, $multicall = false)
    {
        if (!is_string($comment)) {
            throw new InvalidArgumentException('comment = ' . print_r($comment, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($comment), $multicall);
    }
64841
def update(opts = {})
      result = Disqus::Api::update_thread(opts.merge(
        :forum_api_key  => forum.key,
        :thread_id      => id,
        :title          => title,
        :slug           => slug,
        :url            => url,
        :allow_comments => allow_comments)
      )
      return result["succeeded"]
    end
620212
def get_comment_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'comment_record_types' in kwargs:
            return self.get_comment_form_for_create(*args, **kwargs)
        else:
            return self.get_comment_form_for_update(*args, **kwargs)