summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/bootstrap.inc2
-rw-r--r--modules/comment.module1
-rw-r--r--modules/comment/comment.module1
3 files changed, 3 insertions, 1 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d9754a0fc..d597a0530 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -115,7 +115,7 @@ function conf_init() {
$confdir = 'sites';
$uri = explode('/', $_SERVER['PHP_SELF']);
- $server = explode('.', rtrim($_SERVER['HTTP_HOST'], '.'));
+ $server = explode('.', str_replace(':', '.', rtrim($_SERVER['HTTP_HOST'], '.')));
for ($i = count($uri) - 1; $i > 0; $i--) {
for ($j = count($server); $j > 0; $j--) {
$dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
diff --git a/modules/comment.module b/modules/comment.module
index 061bbae55..8ee6594b6 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -284,6 +284,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
case 'search result':
$comments = db_result(db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = %d', $node->nid));
return format_plural($comments, '1 comment', '%count comments');
+
case 'rss item':
return array(array('key' => 'comments', 'value' => url('node/'.$node->nid, NULL, 'comment', TRUE)));
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 061bbae55..8ee6594b6 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -284,6 +284,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
case 'search result':
$comments = db_result(db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = %d', $node->nid));
return format_plural($comments, '1 comment', '%count comments');
+
case 'rss item':
return array(array('key' => 'comments', 'value' => url('node/'.$node->nid, NULL, 'comment', TRUE)));
}