Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
2b3126b2
Commit
2b3126b2
authored
Sep 19, 2005
by
Dries
Browse files
Patch
#19934
by Morbus, chx: conf_init() should strip out port numbers in bootstrap.inc.
parent
804054f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
2b3126b2
...
...
@@ -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
));
...
...
modules/comment.module
View file @
2b3126b2
...
...
@@ -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
)));
}
...
...
modules/comment/comment.module
View file @
2b3126b2
...
...
@@ -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
)));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment