Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
77bf30e4
Commit
77bf30e4
authored
Sep 28, 2011
by
catch
Browse files
Issue
#1000282
by sun, dixon_: reset argument missing for comment_load[_multiple]().
parent
fd0a623f
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/comment/comment.module
View file @
77bf30e4
...
...
@@ -1633,6 +1633,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.
...
...
@@ -1642,8 +1645,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
);
}
/**
...
...
@@ -1651,11 +1654,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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment