Skip to content
Snippets Groups Projects
Commit 75e28b46 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1281436 by dixon_: double spaces in comment.module.

parent a1c091ce
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment