port
This commit is contained in:
parent
d8bcff11a7
commit
04792e998a
@ -201,6 +201,11 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
|
|||||||
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
|
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
|
||||||
}
|
}
|
||||||
$test_path2 = serendipity_getRealDir(__FILE__);
|
$test_path2 = serendipity_getRealDir(__FILE__);
|
||||||
|
|
||||||
|
if (!empty($_SERVER['ORIG_PATH_TRANSLATED']) && file_exists(dirname($_SERVER['ORIG_PATH_TRANSLATED']) . '/serendipity_admin.php')) {
|
||||||
|
return realpath(rtrim(dirname($_SERVER['ORIG_PATH_TRANSLATED'], '/'))) . '/';
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists($test_path1 . 'serendipity_admin.php')) {
|
if (file_exists($test_path1 . 'serendipity_admin.php')) {
|
||||||
return $test_path1;
|
return $test_path1;
|
||||||
} elseif (defined('S9Y_DATA_PATH')) {
|
} elseif (defined('S9Y_DATA_PATH')) {
|
||||||
@ -1019,6 +1024,10 @@ function serendipity_httpCoreDir() {
|
|||||||
return dirname($_SERVER['SCRIPT_FILENAME']) . '/';
|
return dirname($_SERVER['SCRIPT_FILENAME']) . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($_SERVER['ORIG_PATH_TRANSLATED'])) {
|
||||||
|
return dirname(realpath($_SERVER['ORIG_PATH_TRANSLATED'])) . '/';
|
||||||
|
}
|
||||||
|
|
||||||
return $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';
|
return $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +240,9 @@ if (defined('IN_installer') && IS_installed === false) {
|
|||||||
* Make sure that the file included is in the current directory and not any possible
|
* Make sure that the file included is in the current directory and not any possible
|
||||||
* include path
|
* include path
|
||||||
*/
|
*/
|
||||||
if (@file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
|
if (!defined('S9Y_DATA_PATH') && file_exists(dirname(__FILE__) . '/serendipity_config_local.inc.php')) {
|
||||||
|
$local_config = dirname(__FILE__) . '/serendipity_config_local.inc.php';
|
||||||
|
} elseif (@file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
|
||||||
$local_config = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php';
|
$local_config = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php';
|
||||||
} elseif (defined('S9Y_DATA_PATH')) {
|
} elseif (defined('S9Y_DATA_PATH')) {
|
||||||
// Shared installation!
|
// Shared installation!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user