Skip to content

Commit

Permalink
Proper Title now used in Comment Bar on Comment Page
Browse files Browse the repository at this point in the history
Fix for #1121
  • Loading branch information
eSilverStrike committed May 11, 2022
1 parent e2bad6b commit 70eb72f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions system/lib-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,9 @@ function CMT_userComments($sid, $title, $type = 'article', $order = '', $mode =
global $_CONF, $_TABLES, $_USER, $LANG01, $LANG03;

$retval = '';

$is_comment_page = CMT_isCommentPage();

$is_comment_page = CMT_isCommentPage();

if (!COM_isAnonUser()) {
$result = DB_query("SELECT commentorder,commentmode,commentlimit FROM {$_TABLES['user_attributes']} WHERE uid = '{$_USER['uid']}'");
$U = DB_fetchArray($result);
Expand Down Expand Up @@ -2653,8 +2653,9 @@ function CMT_handleView($format, $order, $page, $view = true)
$sql = "SELECT sid, title, type FROM {$_TABLES['comments']} WHERE cid = $cid";
$A = DB_fetchArray(DB_query($sql));
$sid = $A['sid'];
$title = $A['title'];
//$title = $A['title'];
$type = $A['type'];
$title = PLG_getItemInfo($type, $sid, 'title'); // Need title of item not comment title

$display = PLG_displayComment($type, $sid, $cid, $title,
$order, $format, $page, $view);
Expand Down Expand Up @@ -3182,9 +3183,9 @@ function CMT_getCommentUrlId($type, $id)
$retval = PLG_getItemInfo($type, $id, 'url');
}
}

return $retval;
}

return $retval;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion system/lib-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function PLG_commentSave($type, $title, $comment, $id, $pid, $postMode)
* @param string $type Plugin to display comment
* @param string $id Unique identifier for item comment belongs to
* @param int $cid Comment id to display (possibly including sub-comments)
* @param string $title Page/comment title
* @param string $title title of item comment belongs to
* @param string $order 'ASC' or 'DSC' or blank
* @param string $format 'threaded', 'nested', or 'flat'
* @param int $page Page number of comments to display
Expand Down

0 comments on commit 70eb72f

Please sign in to comment.