diff --git a/core/modules/comment/comment.entity.inc b/core/modules/comment/comment.entity.inc index 9df0470..9bd4c59 100644 --- a/core/modules/comment/comment.entity.inc +++ b/core/modules/comment/comment.entity.inc @@ -115,6 +115,7 @@ class CommentStorageController extends EntityDatabaseStorageController { * Overrides EntityDatabaseStorageController::preSave(). * * @see comment_int_to_alphadecimal() + * @see comment_increment_alphadecimal() */ protected function preSave(EntityInterface $comment) { global $user; diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 3e332cf..518cdfe 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -739,7 +739,8 @@ function comment_node_page_additions($node) { // Append comment form if needed. if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_BELOW)) { - $build = drupal_get_form("comment_node_{$node->type}_form", entity_create('comment', array('nid' => $node->nid))); + $comment = entity_create('comment', array('nid' => $node->nid)); + $build = drupal_get_form("comment_node_{$node->type}_form", $comment); $additions['comment_form'] = $build; } diff --git a/core/modules/comment/comment.pages.inc b/core/modules/comment/comment.pages.inc index b176105..de8129d 100644 --- a/core/modules/comment/comment.pages.inc +++ b/core/modules/comment/comment.pages.inc @@ -35,7 +35,8 @@ function comment_reply($node, $pid = NULL) { // The user is previewing a comment prior to submitting it. if ($op == t('Preview')) { if (user_access('post comments')) { - $build['comment_form'] = drupal_get_form("comment_node_{$node->type}_form", entity_create('comment', array('pid' => $pid, 'nid' => $node->nid))); + $comment = entity_create('comment', array('nid' => $node->nid, 'pid' => $pid)); + $build['comment_form'] = drupal_get_form("comment_node_{$node->type}_form", $comment); } else { drupal_set_message(t('You are not authorized to post comments.'), 'error'); diff --git a/core/modules/entity/entity.class.inc b/core/modules/entity/entity.class.inc index 50ffc94..405d755 100644 --- a/core/modules/entity/entity.class.inc +++ b/core/modules/entity/entity.class.inc @@ -77,11 +77,11 @@ interface EntityInterface { /** * Saves an entity permanently. * - * @throws EntityStorageException - * In case of failures an exception is thrown. - * * @return * Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. + * + * @throws EntityStorageException + * In case of failures an exception is thrown. */ public function save(); diff --git a/core/modules/entity/entity.controller.inc b/core/modules/entity/entity.controller.inc index 2c21c28..e0b7cec 100644 --- a/core/modules/entity/entity.controller.inc +++ b/core/modules/entity/entity.controller.inc @@ -406,24 +406,26 @@ interface EntityStorageControllerInterface extends DrupalEntityControllerInterfa /** * Deletes permanently saved entities. * - * In case of failures, an exception is thrown. - * * @param $ids * An array of entity IDs. + * + * @throws Exception + * In case of failures, an exception is thrown. */ public function delete($ids); /** * Saves the entity permanently. * - * In case of failures, an exception is thrown. - * * @param EntityInterface $entity * The entity to save. * * @return * SAVED_NEW or SAVED_UPDATED is returned depending on the operation * performed. + * + * @throws Exception + * In case of failures, an exception is thrown. */ public function save(EntityInterface $entity);