Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
75e28b46
Commit
75e28b46
authored
Sep 16, 2011
by
Dries Buytaert
Browse files
- Patch
#1281436
by dixon_: double spaces in comment.module.
parent
a1c091ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/comment/comment.module
View file @
75e28b46
...
...
@@ -92,7 +92,7 @@ function comment_help($path, $arg) {
* Implements hook_entity_info().
*/
function comment_entity_info() {
$return
=
array
(
$return = array(
'comment' => array(
'label' => t('Comment'),
'base table' => 'comment',
...
...
@@ -542,7 +542,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) {
elseif ($flat) {
// Flat comments.
$count = $num_comments - $new_replies;
$pageno
=
$count
/
$comments_per_page
;
$pageno = $count / $comments_per_page;
}
else {
// Threaded comments: we build a query with a subquery to find the first
...
...
@@ -575,7 +575,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) {
':thread' => $first_thread,
))->fetchField();
$pageno
=
$count
/
$comments_per_page
;
$pageno = $count / $comments_per_page;
}
if ($pageno >= 1) {
...
...
@@ -1439,7 +1439,7 @@ function comment_save($comment) {
$transaction = db_transaction();
try {
$defaults
=
array
(
$defaults = array(
'mail' => '',
'homepage' => '',
'name' => '',
...
...
@@ -1711,7 +1711,7 @@ function comment_num_new($nid, $timestamp = 0) {
$timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT);
// Use the timestamp to retrieve the number of new comments.
return
db_query
(
'SELECT COUNT(cid) FROM {comment} WHERE nid = :nid
AND created > :timestamp AND status = :status'
,
array
(
return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND created > :timestamp AND status = :status', array(
':nid' => $nid,
':timestamp' => $timestamp,
':status' => COMMENT_PUBLISHED,
...
...
@@ -2279,10 +2279,10 @@ function template_preprocess_comment(&$variables) {
// Set status to a string representation of comment->status.
if (isset($comment->in_preview)) {
$variables
[
'status'
]
=
'comment-preview'
;
$variables['status'] = 'comment-preview';
}
else {
$variables
[
'status'
]
=
(
$comment
->
status
==
COMMENT_NOT_PUBLISHED
)
?
'comment-unpublished'
:
'comment-published'
;
$variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
}
// Gather comment classes.
if ($comment->uid === 0) {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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