diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-09-19 19:13:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-09-19 19:13:35 +0000 |
commit | 2b3126b2ccfc51c44ede6f0675626d83527c1778 (patch) | |
tree | ef83f389c8c8160601872fe76116b0905fe6aa8b | |
parent | 804054f3b6e7be51cef4d511768e67856e405407 (diff) | |
download | brdo-2b3126b2ccfc51c44ede6f0675626d83527c1778.tar.gz brdo-2b3126b2ccfc51c44ede6f0675626d83527c1778.tar.bz2 |
Patch #19934 by Morbus, chx: conf_init() should strip out port numbers in bootstrap.inc.
-rw-r--r-- | includes/bootstrap.inc | 2 | ||||
-rw-r--r-- | modules/comment.module | 1 | ||||
-rw-r--r-- | modules/comment/comment.module | 1 |
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))); } |