| 1 |
<?php |
<?php |
| 2 |
// $Id: comment.module,v 1.729 2009/06/27 10:13:28 dries Exp $ |
// $Id: comment.module,v 1.730 2009/06/30 09:57:57 dries Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 860 |
} |
} |
| 861 |
|
|
| 862 |
/** |
/** |
|
* A simple helper function. |
|
|
* |
|
|
* @return |
|
|
* The 0th and the 1st path components joined by a slash. |
|
|
*/ |
|
|
function comment_node_url() { |
|
|
return arg(0) . '/' . arg(1); |
|
|
} |
|
|
|
|
|
/** |
|
| 863 |
* Accepts a submission of new or changed comment content. |
* Accepts a submission of new or changed comment content. |
| 864 |
* |
* |
| 865 |
* @param $comment |
* @param $comment |
| 1001 |
global $user; |
global $user; |
| 1002 |
$links = array(); |
$links = array(); |
| 1003 |
|
|
| 1004 |
// If viewing just this comment, link back to the node. |
// If viewing just this comment, link back to the in-context view. |
| 1005 |
if ($return) { |
if ($return) { |
| 1006 |
$links['comment_parent'] = array( |
$links['comment_parent'] = array( |
| 1007 |
'title' => t('parent'), |
'title' => t('parent'), |
| 1008 |
'href' => comment_node_url(), |
'href' => 'comment/' . $comment->cid, |
| 1009 |
'fragment' => "comment-$comment->cid" |
'fragment' => "comment-$comment->cid" |
| 1010 |
); |
); |
| 1011 |
} |
} |