Skip to content

Commit c8c7eda

Browse files
committed
Fixed: FS#1623 - vhost.conf.master placed in /root overrides vhost.conf.master in ispconfig/server/conf
1 parent fdbfd6a commit c8c7eda

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

server/lib/classes/tpl.inc.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,9 @@ function _fileSearch ($file) {
967967

968968
// check fullpath first..
969969
$fullpath = $filepath.'/'.$filename;
970-
if (is_file($fullpath)) return $fullpath;
970+
if (is_file($fullpath)) {
971+
return $fullpath;
972+
}
971973

972974
// ..then check for relative path for current directory..
973975
if (!empty($this->_currentincludedir)) {
@@ -992,17 +994,23 @@ function _fileSearch ($file) {
992994
// ..then check path from TEMPLATE_DIR..
993995
if (!empty($this->OPTIONS['TEMPLATE_DIR'])) {
994996
$fullpath = realpath($this->OPTIONS['TEMPLATE_DIR'].'/'.$filepath.'/'.$filename);
995-
if (is_file($fullpath)) return $fullpath;
997+
if (is_file($fullpath)) {
998+
return $fullpath;
999+
}
9961000
}
9971001

9981002
// ..then check relative path from executing php script..
9991003
$fullpath = realpath($filepath.'/'.$filename);
1000-
if (is_file($fullpath)) return $fullpath;
1004+
if (is_file($fullpath)) {
1005+
return $fullpath;
1006+
}
10011007

10021008
// ..then check path from template file.
10031009
if (!empty($this->VLIBTEMPLATE_ROOT)) {
10041010
$fullpath = realpath($this->VLIBTEMPLATE_ROOT.'/'.$filepath.'/'.$filename);
1005-
if (is_file($fullpath)) return $fullpath;
1011+
if (is_file($fullpath)) {
1012+
return $fullpath;
1013+
}
10061014
}
10071015

10081016
return false; // uh oh, file not found

server/server.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ else
2121
#
2222
# there is no update waiting, so lets start the ISPConfig-System
2323
#
24+
cd /usr/local/ispconfig/server
2425
/usr/bin/php -q /usr/local/ispconfig/server/server.php
2526
fi

0 commit comments

Comments
 (0)