Skip to content

Commit

Permalink
Getting comment update working
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Dunlap committed Sep 13, 2010
1 parent 9f20dd4 commit 66449c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/comment_resource.inc
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ function _comment_resource_retrieve($cid) {
* Unique identifier for the comment (cid) or FALSE if there was a problem.
*/
function _comment_resource_update($comment) {
$old_comment = _comment_load($comment['cid']);
$old_comment = (array) _comment_load($comment->cid);
if ($old_comment['cid']) {
// Setup form_state.
$form_state = array();
$form_state['values'] = $comment;
$form_state['values'] = (array) $comment;
$form_state['values']['op'] = t('Save');
$form_state['comment'] = $old_comment;

Expand All @@ -241,7 +241,7 @@ function _comment_resource_update($comment) {
return services_error(t('Comment not found'), 404);
}

return $comment['cid'];
return $comment->cid;
}

/**
Expand Down

0 comments on commit 66449c5

Please sign in to comment.