From 113662a617b4c8a66e7355b18cef6bf0e3b99055 Mon Sep 17 00:00:00 2001 From: webchick Date: Fri, 30 Sep 2011 14:42:04 -0700 Subject: Issue #1000282 by dixon_, sun: Fixed argument missing for comment_load()[_multiple](). --- modules/comment/comment.module | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 99b0e2686..239cd5bec 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1636,6 +1636,9 @@ function comment_delete_multiple($cids) { * values those fields must have. Instead, it is preferable to use * EntityFieldQuery to retrieve a list of entity IDs loadable by * this function. + * @param $reset + * Whether to reset the internal static entity cache. Note that the static + * cache is disabled in comment_entity_info() by default. * * @return * An array of comment objects, indexed by comment ID. @@ -1645,8 +1648,8 @@ function comment_delete_multiple($cids) { * * @todo Remove $conditions in Drupal 8. */ -function comment_load_multiple($cids = array(), $conditions = array()) { - return entity_load('comment', $cids, $conditions); +function comment_load_multiple($cids = array(), $conditions = array(), $reset = FALSE) { + return entity_load('comment', $cids, $conditions, $reset); } /** @@ -1654,11 +1657,15 @@ function comment_load_multiple($cids = array(), $conditions = array()) { * * @param $cid * The identifying comment id. + * @param $reset + * Whether to reset the internal static entity cache. Note that the static + * cache is disabled in comment_entity_info() by default. + * * @return * The comment object. */ -function comment_load($cid) { - $comment = comment_load_multiple(array($cid)); +function comment_load($cid, $reset = FALSE) { + $comment = comment_load_multiple(array($cid), array(), $reset); return $comment ? $comment[$cid] : FALSE; } -- cgit v1.2.3