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
2c3864d3
Commit
2c3864d3
authored
Jul 30, 2007
by
Dries
Browse files
- Patch
#147324
by Eaton: make multi-site installations work again.
parent
c33da7d5
Changes
2
Show whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
2c3864d3
...
...
@@ -217,11 +217,22 @@ function timer_stop($name) {
* 12. $confdir/org
*
* 13. $confdir/default
*
* @param $require_settings
* Only configuration directories with an existing settings.php file
* will be recognized. Defaults to TRUE. During initial installation,
* this is set to FALSE so that Drupal can detect a matching directory,
* then create a new settings.php file in it.
* @param reset
* Force a full search for matching directories even if one had been
* found previously.
* @return
* The path of the matching directory.
*/
function
conf_path
()
{
function
conf_path
(
$require_settings
=
TRUE
,
$reset
=
FALSE
)
{
static
$conf
=
''
;
if
(
$conf
)
{
if
(
$conf
&&
!
$reset
)
{
return
$conf
;
}
...
...
@@ -231,7 +242,7 @@ function conf_path() {
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
));
if
(
file_exists
(
"
$confdir
/
$dir
/settings.php"
))
{
if
(
file_exists
(
"
$confdir
/
$dir
/settings.php"
)
||
(
!
$require_settings
&&
file_exists
(
"
$confdir
/
$dir
"
))
)
{
$conf
=
"
$confdir
/
$dir
"
;
return
$conf
;
}
...
...
includes/install.inc
View file @
2c3864d3
...
...
@@ -166,7 +166,7 @@ function drupal_detect_database_types() {
*/
function
drupal_rewrite_settings
(
$settings
=
array
(),
$prefix
=
''
)
{
$default_settings
=
'./sites/default/default.settings.php'
;
$settings_file
=
'./'
.
conf_path
()
.
'/'
.
$prefix
.
'settings.php'
;
$settings_file
=
'./'
.
conf_path
(
FALSE
,
TRUE
)
.
'/'
.
$prefix
.
'settings.php'
;
// Build list of setting names and insert the values into the global namespace.
$keys
=
array
();
...
...
Write
Preview
Supports
Markdown
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